[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] car game mechanics



Doing something like :

a_rad = math.atan2(speedy, speedx)

?

I can turn 360 degrees yeah but it does not make proper rotation... i ll try to find something on the internet about 2d car physics.

2011/8/30 Weeble <clockworksaint@xxxxxxxxx>


On Aug 30, 2011 10:46 AM, "Nathan BIAGINI" <nathan.open@xxxxxxxxx> wrote:

>> a_rad = math.asin(speedx/SPEED)

Try math.atan2, feeding it both the x and y components of the velocity.