View Full Version : Solar System Orbit
Corwin
04-16-2006, 08:33 AM
Hello, I have to create a Solar System, with planets and moons. I calculate the orbit with a function like year=(year+1)%360...
But this way it's too fast. Is there some kind of function (i.e. sin&cos) to slow down the orbit? Thanks.
Mars_9999
04-16-2006, 08:00 PM
Originally posted by Corwin:
Hello, I have to create a Solar System, with planets and moons. I calculate the orbit with a function like year=(year+1)%360...
But this way it's too fast. Is there some kind of function (i.e. sin&cos) to slow down the orbit? Thanks. Ah sin cos have nothing to do with the speed but are for trig to figure out a path or distance. What you need is a timer that returns time since the frame render call. This way you can control the framerate so its not so fast like you are seeing.
Look at these sites
http://www.gamedev.net/reference/programming/features/timing/
http://www.gamedev.net/reference/articles/article753.asp
Corwin
04-24-2006, 04:45 AM
Many thanks, they have been useful.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.