Hello,
I'm still a beginner at Godot and I don't understand why the collision are not working. Could somebody help me ?



(I tried two ways)

  • Collision shapes must be used on Collision Objects to work. The yellow icon Dave mentioned should tell you this when you hover over it.

    Also you connected the wrong signal. The tree entered signal is being emitted when a node is entering your scene tree, for example when creating a new object and adding it into the scene.

    You might want to use the signals provided by collision objects. Area2D for example has a body_entered signal. The collision shape itself does not have signals for collision detection. The shape is just there to tell a collision object what shape to use.

What warning is indicated by the yellow triangle next to the CollisionShape2D node?

Collision shapes must be used on Collision Objects to work. The yellow icon Dave mentioned should tell you this when you hover over it.

Also you connected the wrong signal. The tree entered signal is being emitted when a node is entering your scene tree, for example when creating a new object and adding it into the scene.

You might want to use the signals provided by collision objects. Area2D for example has a body_entered signal. The collision shape itself does not have signals for collision detection. The shape is just there to tell a collision object what shape to use.

Kanko I selected the best answer, assuming it was @trizZzle reply that helped solved your problem. 👍.