For a better understanding, here’s the screenshot
At that position, I keep pressing D for movement to the right, so it’s stuck at that position until I let go of the D key and the rigidbody falls. Maybe that’s the problem, but what is the reasoning behind that?
I’m using velocity for movement, here’s the code
Is there a way to prevent this? If there are any discussions about this, it would be great to share the link here. Thank you!
@Shiina011_1 this because of the friction between your player and wall, which is applied through rigidbody component. You are pressing d for right side movement and while pressing you are giving a continuous input to the player. Which overcome the rigidbody gravity and when you leave the D key now rigidbody will do its work.
Create a physics material 2d and in that friction goes to 0 and if you want bounciness then it upto you . After that apply that material in player rigidbody material selection.