4

Which direction is considered 0 degrees in box2D? Is it north, south, east, west? And then do the angles increase clockwise, or counter-clockwise?

I've read through the manual and it doesn't seem to mention this anywhere.

Jim
  • 661
  • 11
  • 30

1 Answers1

9

Box2d actually uses radians... 0 would correspond to "East".

http://en.wikipedia.org/wiki/Radian

enter image description here

Michael Fredrickson
  • 36,839
  • 5
  • 92
  • 109
  • This is perfectly true - box2D is indeed working just as the picture describes. Angles increase counter-clockwise from East, just like in geometry. They can also be specified as negatives, so -pi/2 is equivalent to 3pi/2. Worth noting is that Android's draw functions use degrees increasing in the clockwise direction, so you must convert to degrees and then make them negative as well. – Jim May 11 '11 at 18:59