2d movement blockers

im making a 2D game with box collidors it’s an RPG.

i unchecked IsKinematic and turned off Gravity on the player who has a collidor and rigidbody and BoxCollidors on the walls and player.

I want to make it where the player cant walk through a wall, cant walk through other players, etc. but whenever the player collides with a wall they bounce off of it and fly off to eternity very slowly but never stop moving.

alternatively i just want to know how to make a script where if box collidor Player collides with box collidor Wall or Object, then the Player’s movement stops in that direction. but my script FREEZES the player entirely and then he can never move again.

so if i use the physics it makes the player bounce off the wall and he can never stay still again. if i use IsTrigger collidors and a stop movement script upon entering Object/Wall collidor, then it freezes movement permanently.

help please i dont know what to do

You may be able to solve this by using character controllers for the players instead of rigidbody objects. Character controllers are blocked by colliders but don’t otherwise have physical reaction with the environment (so they don’t bounce, spin, fall, etc, unless you actually make that motion happen from code).

That sounds like the exact solution. Thanks andeeee, I noticed at least three members on this forum needing help with this, so your answer helped Skulltemp, me, and whoever the third was.

Thank you.