Hi, i've seen a couple of people asking how to rotate one entity around another one using code. I was just browsing and saw someone wanted to build a solar-system simulator or similar, but couldn't figure out how to do the rotation.
I've just built this in the last 15 mins...
> Allows you to rotate planets/satellites/etc around other objects.
> All done through 1 function, saving code space.
> Allows you to specify orbit radius, orbit speed, pan/roll/tilt speeds, line of latitude.
> Supports circular and elliptical orbits.
> Can be used for other things, not just planets, that require rotation around a point or entity.
I've tried to explain inside the planet_orbit.c file as much as i could.
Hope it is useful to someone, if not it's more practise coding for me, lol.
Finally here is the download link >>>
http://www.djbm.kawanda.net/public_files/planetorbit.zipBTW > would work really well with the planet shader i've seen floating about. Should be in an AUM somewhere.
Thanks...DJB MASTER...