- Home /
Is there a way to unfreeze only one constraint?
I'm working on player movement, but I came upon a problem. The problem is that, if I try to move the player from left/right the player won't instantly stop, he will keep sliding, like he is on ice.
I tried to change the Gravity scale, but that seems to screw up my jumping.
Is there a different solution, to fix the sliding?
Answer by tusadi · Nov 29, 2017 at 11:55 AM
You can try increasing the drag in rigidbody component or play with friction to see what suits you best. A new physics material can be created just like any other material and assigned to the collider instead of the renderer.
Creating a new Physics material 2D seems to fix the issue. I changed the Friction of the Physics material 2D to a higher number and it worked. The player will no longer slide when I stop moving.
Thank you for answering!