Rotating object code

What did you draw?
Post Reply
Posts: 9
Joined: Sat Feb 15, 2014 5:59 am

Rotating object code

Post by ahmedkq » Sun Sep 05, 2021 10:19 am

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?

User avatar
Site Admin
Posts: 1138
Joined: Mon Nov 19, 2012 7:54 pm

Re: Rotating object code

Post by testtubegames » Sun Sep 05, 2021 10:37 am

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:

Post Reply