- Home /
Unity 5: Mecanim/Animator-Driven Collision No Loner Sliding Along Walls
My game uses a movement system almost entirely derived off the Stealth tutorial. The player moves with root motion from the animations setup in the Animator. The player has a Capsule Collider, is a Rigidbody, and for the purposes of this problem is colliding with objects with box colliders (but the same problem happens when colliding with mesh colliders).
Under Unity 4, when I ran into a wall at an angle, the character would nicely slide along the wall they were colliding with. Now, having just upgraded to Unity 5, this is no longer the case. The character will not slide along the wall at all, until they are almost completely parallel to the wall, then they will slide along very slowly.
I've been searching for an answer to this problem some time and can not find anything useful. I'm hoping to tune this sliding to make it more like Unity 4's.
Any ideas?
That fixed it - I had no physic material assigned to my capsule collider and in Unity 4 that defaulted to no friction. In Unity 5 it defaulted to full friction.
Adding the physic material, and setting Dynamic Friction and Static Friction to 0 and set the "Fiction Combine" to $$anonymous$$inimum, and it now works pretty close to exactly like it did in Unity 4.
Thanks!
Answer by karl_jones · May 24, 2015 at 12:18 PM
Check if your character has a physics material applied to it. You need one with zero friction to allow it to move along a wall.
Your answer
Follow this Question
Related Questions
How to handle custom collision sliding 0 Answers
Object is sliding off instead of bouncing! 3 Answers