Hi,
Assume I want to write the code of a more realistic solar system, how to code the angular velocity of the sun, earth, or any planet rotating around its own axis?
Thanks
Rotating object code
- testtubegames
- Site Admin
- Posts: 1139
- Joined: Mon Nov 19, 2012 7:54 pm
Re: Rotating object code
At a certain point you'll run into issues with the fact this sim is built in 2D -- sorry Uranus. But in general if you want to give objects a rotational speed using code, it'll be input as "rotspeed: 20"... which would be 20 degrees rotation per unit time.
There's more detail about the codes here:
https://testtubegames.com/gsim101/?p=save_codes
There's more detail about the codes here:
https://testtubegames.com/gsim101/?p=save_codes