Distance travelled by a character is limited (capped) when using Mecanim

I’m trying to use Mecanim to animate my character instead of using the old legacy system.
Mecanim needs the animation to have Root Motion, so the animation is already moving forward and we can specify the speed of this motion in the animation state.

I have followed the tutorial on the new Learning center.
However, no matter how much speed I try to add, the amount of distance travelled by my character is more or less the same.

Video showing that the distance travelled is limited!

I created a video to show you what I mean. In this video, I’m using Mecanim animations provided from the free Project Stealth available for Unity 4.1. The version of Unity that I’m using is 4.1.2f1.

My question is how do I modify the amount of distance travelled?

Why is the amount of distance travelled by my character is capped (limited)?

Here’s a screenshot of my Blend Tree locomotion state (Walk threshold is 1.5 and Run is 5.6)

alt text

And this is the condition on the state transition between Idle and movement

alt text

Here’s a screenshot of my animation controller

alt text

Here’s a screenshot of my character’s inspector

alt text

P.S: PlayerMovement Script is unchecked on purpose. I want to see the character run by itself forward. Even if I enable PlayerMovement, then when I move forward using keyboard input, the distance travelled by my character is still limited.

Please help! I don’t know what’s wrong any more!

Maybe there's an issue with your physics components (rigidbody and capsule collider). To isolate just the animation, try previewing it on your character. Select the animation, drag your character into the preview area at the bottom of the Inspector panel, and hit play.

1 Answer

1

Hi there, this could be a couple of different things, and despite your high detailed post I’m still not totally sure which it is.

From the video link, it appears to be a scale issue, though often with a scale larger than it should be, graphically it should display wrongly to show you this. Is the character roughly the height of two cubes? (2 units tall) This is pretty standard for a humanoid.

Next thing to ask is where you’re drawing the animation from - is it your own or some animation data you’ve downloaded. If so, where from? We’d also need to see your code so please paste us it or link to pastebin.com.

If you want to prefab and export the character and its dependencies and upload them somewhere, i’m happy to take a look at this for you.

Our Mecanim team just pointed out that you haven't checked 'Animate Physics' in your Animator - as you're using a rigidbody, this is important. Try that and let us know.

Ok, I have solved it! You need to re-apply the rig for your model avatar by going to the Rig tab and choosing copy avatar from model then choosing "None" and apply changes. Then, choose create from this model and hit apply. I found the solution in a [forum post here][1] by Alf203. The screwed up model upon changing scale factor with mecanim [seems to be a bug][2] [1]: http://forum.unity3d.com/threads/169199-Problems-with-the-Mecanim-Animation?p=1157826&viewfull=1#post1157826 [2]: http://forum.unity3d.com/threads/169353-Mecanim-Avatar-FBX-Scale-bug