I followed this tutorial: 2D Character Controllers to make a character for a 2D platformer. But I noticed one problem: if I’m pressing the directional key towards a wall while the character is in the air, they will stick to the wall and stop falling. The character controller knows that it’s not grounded, so I don’t know what the problem is. How do I work around this?
Apply a “slippery” physics material to the character’s box collider.
Assets > Create > PhysicsMaterial2D and simply changed the friction variable to 0 from the inspector and apply to walls as well as character.
add box colider then click ‘Used by Effector’
add a component ‘platform effector2d’ untick ‘one way’
and if you are using Gronded with ground layer then and the items to this layer…
i.e, Assets > Create > PhysicsMaterial2D and simply changed the friction variable to 0 from the inspector and apply to walls ONLY,
This as been a while but I will still add my input for anyone else who might be having the same issue. While the above method might work. You may alternative adjust the skin width of the character controller. Hope that helps