func _on_YarnMouse_body_entered(body):
if body.is_in_group("Paws"):
emit_signal("score_increment")
print("entered")
To this:
func _on_YarnMouse_body_entered(body):
print("entered")
if body.is_in_group("Paws"):
emit_signal("score_increment")
print("paws detected")
That way, you can tell whether the problem is that the function isn’t getting called, or that the if-statement doesn’t run.
But also, if it works with the wall group… Are you sure it isn’t “paws” with a lower case P, or “Paw” without the s, or something like that? What if you copy and paste the group name from the paw node into the code?
Also, is the group on the actual kinematicbody, or is it on some other node in the paw scene? I’d assume it has to be on the kinematicbody in order to work.
I am sure but i am afraid that i can make an very stupid error so i posted a photo of my group and my script, yes there is an other paw in my pawparent scene
also what i got
— Debugging process started —
Godot Engine v3.5.3.stable.official.6c814135b - https://godotengine.org
OpenGL ES 3.0 Renderer: GeForce GTX 550 Ti/PCIe/SSE2
Async. shader compilation: OFF
Ok, so it’s CatPawsParent that has the Paws group? But that’s a Node2D, right? I think the group has to be on the actual KinematicBody - it’s not the parent node that collides with the yarn mouse, it’s the KinematicBody, so that’s where it looks for the group.
Yes that was the problem, i was thinking if my catpawsparent is in Paws group they will be already in that group,so Thank you very much for helping i appreciate it!