Why shouldn't i update my position directly and instead use move_and_slide??

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

Is it just because of simplicity and collisions??
'cause if that’s the case i want to solve my movement in an other way.

PS.: please answer quickly.

:bust_in_silhouette: Reply From: kidscancode

If you’re using a kinematic body then you presumably want collision detection. In order to detect collisions and prevent the body penetrating other bodies, you must use the kinematic body’s built-in movement methods. Changing the body’s position directly will not detect collisions.

If you don’t want collisions, then feel free to change the coordinates directly. If all you need is contact detection, consider using an Area/Area2D instead.