Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Naumen0 |
Hi. Here’s the code:
for index in range(get_slide_count()):
var collision = get_slide_collision(index)
var object = collision.collider
print(object.get_groups())
get_groups()
method returns only empty arrays even though colliders are in groups. The problem is that collision.collider
returns Object
that doesn’t have get_groups()
method but Node
does. I tried adding as Node
to the variable but it didn’t help. What should I do?
Note: yet somehow similar code works in “your first 3D game” demo
Are you sure the collider is the object/node that you think it is?
SteveSmith | 2023-01-13 10:54
I suppose as it inherits from Node
Naumen0 | 2023-01-13 16:18