Freeze other object when coliding.

I’m trying to make a sliding game where u can slide walls.
When a wall A hits another wall B it start moving wall B in the same direction. but it shouldn’t.

wall A should stop where it hits with wall B and wall B shouldn’t move.

I guess you use rigidbodys on your walls. If you want a rigidbody to ignore physics you have to set it to kinematic. Check the isKinematic box on your rigidbody and they won’t get pushed away by other rigidbodys.