What is the best way to make a 3D Character that can push RigidBodies but is stopped by Static/Kinematic bodies?

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

Currently, I’m using a KinematicBody, but I can’t seem to find a way to satisfy both of my requirements:
A. The character must be stopped by a static/kinematic body
B. The character must be able to push a RigidBody

I can satisfy A by using move_and_slide or move_and_collide on the KinematicBody. Unfortunately, this causes my character to be able to push other RigidBodies for only a small distance before being stopped by the interaction.

I can satisfy B by moving the character directly by changing its transform.origin. However, since nothing prevents this from happening, the character can go straight through static bodies.

I thought about using test_move, but since it returns a boolean I can’t tell whether the object the character would collide with is a static body or a rigidbody.

:bust_in_silhouette: Reply From: Bartosz

there is third option - use RigidBody for your character. It will be harder to make character behave the way you wan’t but it satisfies all your requirements.
To move character you would either add forces to it or apply impulses.