Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualParadigm Shifter

Posted 18 April 2013 - 11:48 AM

acos only returns angles in a 180degree (pi radians) range.

 

Use atan2(y, x) instead, that returns a full 360 degree range.

 

EDIT: Better still drop the trig and use your facing (normalise it and scale by movement speed) for your velocity.


#1Paradigm Shifter

Posted 18 April 2013 - 11:47 AM

acos only returns angles in a 180degree (pi radians) range.

 

Use atan2(y, x) instead, that returns a full 360 degree range.


PARTNERS