Root Motion on Slopes

Question

I have a character set up to move based on an animation (Apply Root Motion is ON).

Problem: The player seems to fall too slowly, making the player glide in mid air. This is a problem because it sets my grounded variable to FALSE and the player constantly switches from grounded to not grounded.

Anyone familiar with root motion have a fix for this?

Posted Apr 13, 2019, 11:08 AM UTC

11
sunsetRedderOPNovice•

Update: I've added a curve to all the grounded animations called "gravityWeight" and made the curve 1.000 all throughout the animation.

The way I understand it, Unity automatically uses that keyword to adjust the gravity of an animation...

and yet, the player still glides if you run up the hill and turn as fast as possible.

(Note: root motion only handles forward movement and I manually rotate the player based on input with Quaternion.LookRotation).

Update 2: I adjusted the Physics.y variable from the Edit>ProjectSettings tab. Decreased the Physics.Gravity.y variable to -45 from -9.81.

This, in combination with the "gravityWeight" curve set to 1.000, has given me results that I am happy with. The player no longer glides since the gravity pulls too heavy on her. In addition to that, the player also slides down slopes much faster. Only time the player glides off a slope is if the wall is too steep, but I will be changing the animation based on slope anyway so that you can't continue to run up a steep wall.

Basically, adjusting the physics + curve make the player less floaty.

1