Changing the controller's minimum input magnitude to begin animations?

dandesign

New member
Hello,

I've been working on animations recently, and I've noticed that when I push the stick very very slightly forwards, the walking animation will begin to play, but the player will stand in place.

I am using Rewired, though it seems to be happening with default Unity's input as well. This can be reproduced in the demo scene:

Unity's input:

Simply push the stick very slowly forward, until you come to the point where the walking animation starts to play. Now hold it there. The player will be playing the walking animation, while the character requires the stick to be pushed a bit more forward to begin walking.

Rewired:

Add the Rewired integration, and do the same thing as with Unity's input. The same behavior is present.

I was wondering if there could be any way to change the deadzone, or the amount of input magnitude that the controller needs to start playing the animation.

Here's a video of the issue:

 
No root motion. I did replace the animations.

I'm on 2.1.10, which appears to be the latest.

I've opened up a new project with just the controller, and it seems like the issue is still there in the demo scene. Turning root motion on or off doesn't seem to make a difference.

I'm fine with the character not moving unless the stick is pushed a bit further, it'd just be great if the animations didn't start before that point.
 
Ah, without root motion the damping value is likely more than the acceleration so that's why there isn't any movement. The animator is based off of the input values rather than the velocity so that's why the animation plays.
 
So I've messed around with the damping value a bit, but it seems that there's always just a tiny gap where the animation starts to play, but the character doesn't move. Past a certain value, the opposite happens - the player starts to move, but the animation doesn't play. I suppose there's a value somewhere in between there where both start to match, but we're talking in .00 ranges here, so trying to find that value would be a bit of a mess.

I've also experimented with root motion, but, again, the same behavior is present - animation plays, character doesn't move.

Here's a video with both normal movement and root motion having the same issue:

 
There likely is some movement being applied, but it is much smaller than what it looks like the animation should be moving so that's where the discrepancy is. Can you output the acceleration/damping values within CharacterLocomotion.UpdateMotorThrottle to verify that it is adding the values? One solution may be to modify the animator controller to either play a less extreme animation when the Horizontal/Forward movement values are so small, or to not play an animation at all.
 
Top