-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Vector2i/3i/4i
methods: distance_to
and distance_squared_to
#83163
Conversation
BTW I'm having some trouble squashing the commits - |
You need to use |
83d5d3d
to
d69b06f
Compare
Thanks, that did the trick. |
c5285e7
to
cb954c6
Compare
Note this still needs proposal approval to go foward: (sorry this comment was primarily addressed at reviewers, rather than author) |
I am aware of that but I don't see how I can further the cause at this point; many people across both linked proposals agree that the addition of Knowing the distance between two points on a grid seems like a very basic functionality for any cell-based game, so it's not like there aren't any real use cases. If Godot's team's consensus is that such arguments aren't strong enough to go through with this PR, it can be closed or left hanging until stronger argumentation arises, no hard feelings. |
Also, a certain other game engine has these methods implemented, which might be considered an argument for also having them in Godot: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me (especially after #53618 got merged), use cases are obvious IMO.
For parity I'd suggest adding the same to godot-cpp |
Thanks! |
This pull request implements
distance_to
anddistance_squared_to
methods forVector2i
,Vector3i
andVector4i
.Partially implements #2297, closes #7983.