Unity 2D Platformer Collision Issue

I’m trying to make a platformer game similar to classic megaman games, and I’ve got platforms laid out, however I’m having an issue when it comes to vertical walls. I am using RigidBody2D and it’s velocity property to control movement and jumping. However when I collide with a vertical wall, all velocity drops to zero. And he just floats at the wall when I push forward.

I don’t understand why this is happening, if a collision happens on the side, the only part of the velocity that should change is the X value. Is there any reason for this?

1 Answer

1

I figured out what the problem was, I needed a physics material to have no friction for the edges.