Add an 'angle_difference' method for finding the shortest distance between two angles #8108
Closed
Miziziziz
started this conversation in
Engine Core
Replies: 3 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
I believe this is simpler right now:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Closing as implemented in godotengine/godot#80225 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Many times when I'm making games I need to find the shortest difference between 2 angles, right now the simplest way to do this is:
var angle_diff = Vector2.RIGHT.rotated(angle_1).angle_to(Vector2.RIGHT.rotated(angle_2))
It would be nice to simplify this into one method call like:
var angle_diff = angle_difference(angle_1, angle_2)
Beta Was this translation helpful? Give feedback.
All reactions