![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | ulty |
OK, I found the answer to my question myself, but for anyone else who might also be confused, I will document it here:
You can get the position i.e. origin of a collision shape by using
shape_owner_get_transform()
on a CollisionObject2D → (Area2D/KinematicBody2D…)
The “owner” is the index of the shape if there is only one then just use 0.
Example:
Area2D_01.shape_owner_get_transform(0).origin
myKinBody2D_01.shape_owner_get_transform(0).origin
Hope this helps