How i make a RigidBody2D (my player) dies when colliding with a ColisionPolygon2D

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By samuel04

How can I make a RigidBody2D (player) “die” when it collides with a CollisionPolyon?

-The RigidBody2D is my player, how can I make when I hit a trap (CollisionPolygon) the RigidBody2D (my player) dies

Please, read first this:
Collision theory: Physics introduction — Godot Engine (stable) documentation in English

Collision practice:

then if you got any error or problem with your code, ask again :slight_smile:

betauer | 2021-02-11 13:29

I have the same problem

SoytomasS | 2021-02-14 14:26