![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | MemokingMH |
I can’t seem to use distnce_to() function anymore. I’m asking for 2d btw
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | MemokingMH |
I can’t seem to use distnce_to() function anymore. I’m asking for 2d btw
![]() |
Reply From: | jgodfrey |
The distance_to()
function still exists (note you’ve misspelled it above). Here are the docs:
FWIW, it looks like the Vector2i doesn’t have distance_to()
and it has been added to 4.3. Add a distance_to()
method to Vector2i · Issue #7983 · godotengine/godot-proposals (github.com)
So what I did was convert my Vector2i
to Vector2
when I need that capability.