- Home /
using rigidbodies for platforming having issues
so for my 2d platformer I control the characters movement with rb.velocity, and when Im walking into a wall, it sets my y velocity to 0, any possible solutions?
Answer by AaronBacon · Nov 26, 2020 at 03:20 AM
What's happening is that by default the Wall has friction, and by walking into it, the friction stops you moving. Create a PhysicsMaterial2D in the Project Files, Set it's friction to 0 then drag it onto the RigidBody2D component of either the Player or the Wall. As long as one of them is frictionless, they won't affect the player momentum.
You can mark the answer as correct to help others who have the same issue
Your answer
Follow this Question
Related Questions
Rigidbody2D velocity changes when moving through a platform collider. 1 Answer
How to move a rigidbody2D at a constant speed without AddForce? 1 Answer
I want to move the player once while he is jumping 1 Answer
Updated version of Rigidbody2D.velocity? 1 Answer
Scaling an object causes slow movement (Since Update 5.5.4) 1 Answer