How can an Object with "move_and_collide" get stopped by an wall

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

Im really really new to Godot and im working on a Game where a box pushes the Player ( an Kinematic Object) out of the Screen. But if i try to apply gravity to the box the Engine says "Invalid call. Nonexistent function ‘moveandcolllide’ in base ‘StaticBody2D’
Im really frustrated and hope someone can help me ^^

:bust_in_silhouette: Reply From: exuin

That’s because that function does not exist for a static body since they are not meant to move. You can instead set a constant linear velocity for it or modify its position directly. Or you can use a different type of node.