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 not working
What warning is indicated by the yellow triangle next to the CollisionShape2D node?
- Edited
- Best Answerset by MikeCL
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.
It worked, Thank you !