Help with Signals on a body_entered with a Node 2D

Godot Version

v4.2.1.stable.mono.official

Question

So I am just starting to get into Godot, and I am starting with the tutorial below.

For my signals for Area2D I have a body_entered triggering a function OnPlayerBodyEntered().
But I am not having the function triggered. I have a GD.Print() which does not seem to be called.
I have put both of the collisions on the same layer, I’m pretty sure I have my collision boxes set up right?
I assumed it would work as a Rigid2D seems to inherit from a Node2D.

Anyway I imagine I am doing something silly and stupid that I have overlooked.

Just looking for any advice.

The code is here: Godot-Tutorials/dodge_the_creeps at main · krishangordhan/Godot-Tutorials · GitHub

Let me know if you need any more info?

Will never trigger because you’re disabling the CollisionShape2D in your player code:

    public void Start (Vector2 position)
    {
        Position = position;
        Show();
        GetNode<CollisionShape2D>("CollisionShape2D").Disabled = true;
    }


This is the code in the tutorial:

public void Start(Vector2 position)
{
    Position = position;
    Show();
    GetNode<CollisionShape2D>("CollisionShape2D").Disabled = false;
}
1 Like