Hi, You can put the body+satellite in a container, use that code on the "group" or container instead of the planet itself.
Then you can use the same code on the satellite inside but replace with 'body" with your satellite. So, same code just change what it affects. Let me know if makes any sense. -Pete On Thu, Apr 16, 2009 at 8:15 PM, anndorian <[email protected]> wrote: > > Ok, I have a star and a planet orbiting around it using : > > // posX - distance between star and planet > theta=Math.PI; > > theta -= (speed * 0.1) / 180 * Math.PI; > > body.x = Math.cos(theta) * posX; > body.z = Math.sin(theta) * posX; > > The problem is I don't know how to put a satellite orbiting that > planet ( which orbits the star ). Can anyone help me ? > > Thanks. -- ___________________ Actionscript 3.0 Flash 3D Graphics Engine HTTP://AWAY3D.COM
