Hi everyone,
In my game I want a missile's angle to be the same as the angle formed by its mother ship's linear velocity.
So really what I need is a way to calculate the angle formed by a b2Vec2. I can't seem to get it right by using Math.atan(vector.y, vector.x). It would be nice to know of some function within the box2d classes that calculates a box2d-ready angle based on a given b2Vec2.
In my game I want a missile's angle to be the same as the angle formed by its mother ship's linear velocity.
So really what I need is a way to calculate the angle formed by a b2Vec2. I can't seem to get it right by using Math.atan(vector.y, vector.x). It would be nice to know of some function within the box2d classes that calculates a box2d-ready angle based on a given b2Vec2.