Topic was automatically imported from the old Question2Answer platform.
Asked By
LouisSimon22
Is a KinematicBody2D supposed to detect a collision with a RigidBody2D?
A KinematicBody2D doesn’t register collisions with a RigidBody2D, even though it clearly happens because the rigid body gets pushed back. Changing the rigidbody2d to a staticbody2d makes it work too.
By default, the KinematicBody2D has the infinite_inertia parameter (in move_and_slide() or move_and_collide()) set to true. When this is the case, you won’t detect collisions with rigid bodies, and they’ll be pushed regardless of their mass.
If you disable infinite_inertia the kinematic body will stop on hitting rigids and report a collision. If you then want to push the rigid body, you’ll have to apply an impulse manually.