Angle to is weird in godot 4

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By dpraktika

Why is Vector2(230,656).angle_to(Vector2(230,705)) not returning 0 radiants?

:bust_in_silhouette: Reply From: Mario

That’s because these vectors are defined by X and Y. If you change Y, but not X, the direction obviously changes.

Both vectors plotted

Oh so that’s how they calculate angles. Thanks for expalaining!

dpraktika | 2023-03-20 00:58