How to Make a Ship and it's Projectiles Orbit a Planet? (Like in Super Stardust)

Hi,

I am looking to make a game similar to that of super stardust – like this

It is basically a game where the player, camera, enemies/asteroids and projectiles are orbiting a planet around a certain radius from its centre point. The player has to destroy the enemies/asteroids by shooting them while all the shots curve along with the planet.

I have created the planet and the player using this asset, but what i am having trouble doing is making the player, camera, enemies/asteroids and projectiles orbit the planet.

I am using this asset for constructing the scene (if its any help) Space Unity

I am fairly new to programming and i am still learning, but any help would be appreciated :slight_smile:
I am also using playmaker (if its possible to create the orbit with playmaker)

Thanks :slight_smile:

Screenshot about what i am trying to achieve: http://i.imgur.com/AQDQeS8.jpg

an extremely simple way to do this is:

you have the planet P.

just add an empty transform, called “spinner” at the same point.

Sit your satellite “S” in “spinner”

Now, move the “S” “outwards” until it is say 20 km from the planet (or however far you want)

Now … just rotate “spinner”

It’s just that easy.

You can then more “S” in and out (“up and down form the planet”) trivially and it will maintain it’s clean orbit.

It’s a great example of the unbelievable power of the transforms and parenting concept in game engines.

Unity does not support this out of the box. You’ll need to disable the built-in gravity (in [settings][1] or

[2]) and code the planetary gravity yourself.

Perhaps [this answer][3] might help you.


  [1]: http://docs.unity3d.com/Documentation/Components/class-PhysicsManager.html
  [2]: http://docs.unity3d.com/Documentation/ScriptReference/Physics-gravity.html
  [3]: http://answers.unity3d.com/questions/36653/planetary-gravity-falling-off.html