# Space Game - Planet Physics Help

**URL:** <https://forum.kirupa.com/t/space-game-planet-physics-help/303410>\
**Category:** programming\
**Created:** [January 20, 2010, 12:30am UTC](https://forum.kirupa.com/t/space-game-planet-physics-help/303410 "2010-01-20T00:30:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruck](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@Bruck](https://forum.kirupa.com/u/Bruck)\
**Post date:** [January 20, 2010, 12:30am UTC](https://forum.kirupa.com/t/space-game-planet-physics-help/303410/1 "2010-01-20T00:30:10Z")

</div>

Hi, I’m doing a project, I basically want to create a little space game where your an asteroid and you go around the solar system and you can approach planets and orbit around them but so far I really haven’t been able to get it working.

A few days ago I found this neat little tutorial that lets the player orbit a planet fairly well. It was in as2 and I converted the gravity function to as3.

[http://www.flashninjaclan.com/tutorialpage.php?ID=61](http://www.flashninjaclan.com/tutorialpage.php?ID=61)

Now my game does do something but its odd, it seems to randomly force my asteroid to repel and follow strange paths. The planet just doesn’t seem to work.

[Here’s the fla](http://jamesbruck.com/asteroid.fla), I’d really appreciate any help or suggestions, its just so exhausting.

Thank you
