- Home /
[SOLVED] Slide Animation Occurs in Air
Hello All!
I am using the raw mocap asset from unity and specifically both of their slide animations don't work the way I want them to. I am using Apply Root Motion and have isKinematic set to false. I don't think any of my settings are incorrect though because all of the other animations work perfectly. When I look at the slide animations from the inspector, their root motion looks like the player in sliding on the ground, but when I apply the animation to the character, he slides a foot or two off the ground and it looks like he's sliding on an invisible floor.
The character is locked in rotation on all axis, but doesn't have any locks on its position. I do not script anything related to the physics of the character or any transform.translates etc.. Any insight would be helpful, thanks!
Answer by smit120 · Aug 19, 2015 at 09:48 PM
I have since fixed this problem. The problem was that I have a capsule collider around my whole character that was restricting the root of the character from moving down due to collision with the floor. I ended up making a curve with my slide animation that I used to programmatically change the value of the collider height. A very similar example of this is done in the unity mecanim tut with the jumping animation
link here: https://www.youtube.com/watch?v=Xx21y9eJq1U