Does the atan2() function uses the global X axis? If so, how can I use the local object X axis in order to properly steer it?

0 votes

The function simply returns the arc tangent of the values you give it. If you are trying to calculate the bearing to a vector relative to a different vector, you can either use `Vector.angle_to_point()`

or subtract the vectors and calculate the atan2 between the result's coordinates.

I thought about sum or subtract this angle on the object rotation, so it would "apply" to his own directions, however, i think it require some math coding. Anything I may be missing?

- All categories
- Engine 25,989