need some answer pls.. im just a newbie on this..

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

what code can i use the “egg hits the platform/floor and not be counted and be destroy at the same time”…im using node2d for the Egg and staticbody2d for the platform/floor…i need some bright minds here ehehehe thanks in advance…

:bust_in_silhouette: Reply From: ejricketts

You would need to use a signal from the static body, so that when a body/area enters its collision zone you can call functions etc.

It may make sense to have the egg as a kinematic body, so that when it falls you can use the signal _on_body_entered() to call body.queuefree(), i.e., the body that enters and touches the floor/platform gets destroyed

Egg should be a rigidbody, ground plane should do the detecting since it’s the “killer” in this case; maybe replace ground plane with an Area instead? KinematicBody is used when you want to control the object entirely (ie, your own gravity and such)

Jimmio92 | 2021-01-29 00:58