Stop Movement On Trigger

Hey,

So l have a player snapped to a grid who can move up,left,right and down by dragging the mouse in that direction. When he hits into a wall he goes floating away. So is there a way you can check if the player is on a certain gameobject, just before hitting into the wall, and then disable all controls except the mouse drag for going backwards. Thanks in advance.

So I guess that you are moving your player with a rigidbody. If so I would suggest making it kinematic OnTriggerEnter and setting its velocity to Vector2.zero or something like that. :slight_smile: