Beginner: Can you detect body_entered in a KinematicBody2D?

Godot Version



I want to have special handling when my KinematicBody2D collides with another specific KinematicBody2D and was wondering if that is possible.

Since I noticed that KinematicBody2D does not have a body_entered signal I was thinking of adding an Area2D as a child of the KinematicBody and creating a copy of the CollisionShape2D in us used, as a child of the Area2D. This howerver seems lika bad solution espacially since I would have to handle 2 seperate duplicates of the CollisionShape2D.

I may be wrong, but I think the response I’ve seen is that since one of the two bodies must be moving, the move_and_collide function can be used in the moving body, and you can just call the function you want in either body in response to the collision.

I think whether you want Area2D may generally boil down to whether you actually want/expect things to be able to move into the area? (Though that doesn’t have to be the only way it’s used.)