![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | demon3o5z |
The _on_body_entered signal seems to work backwards to how I need it. I have a grappling hook (Rigid body 2D) that needs to know the group of the thing it collides with, but for some reason the following code returns the group of the hook itself.
func _on_Hook_body_entered(body):
if body.is_in_group(“surface”):
do stuff
queue_free()
else:
queue_free()
I’ve struggled with signals since starting with godot. Is there a smarter way to detect when the hook collides with something and then get the group of that something?
what do you mean by “returns the group of the hook itself”? i don’t see anything in that block of code that would return a group name.
Eric Ellingson | 2020-03-11 23:43
I should just close this down. It now works. I could not tell you what I changed.
demon3o5z | 2020-03-13 00:58