I am using a mecanim animation set that I purchased.
Waypoints are created and the char moves with a speed of 2 to wards the nextStop parameter for the move.
Which is in a way… Perfect.
However my animation is a step by step animation (hurt look and feel) so no matter what value for the speed I enter… The char seems to slide over the floor.
When I enable root motion on the RAIN tab, the char doesn’t move anymore, but plays the desired animation clip.
(I chose in all settings the mecanim options and attached the correct animations)
What do I need to do? I hope all this is clear enough.
Let’s make sure the root motion is working appropriately. Try this out:
Drop your character on a plane in an empty scene, remove any AI on it
Create a Controller and put just the walk animation in there, make sure it is the default state
Assign the controller to the character’s Animator and make sure root motion is on it
You should see the model move on its own at this point. Assuming that works, only the following is necessary (in the simplest setup): Animator with root motion on, AI with Mecanim Motor and Use Root Motion on, AI with Mecanim Animator.
I’ve tried that and it appears that the root motion movie clip doesn’t make the character move without any AI as you mentioned.
The controller has only the root motion movieclip attached and it plays in a loop. However the character keeps on jumping back to it’s initial starting position.
The animation itself is a humanoid. And I can clearly see it walk (also with a -return to origin- motion)
Perhaps the clip accidentally included too many frames. You can adjust the length of the clip in the import settings and that might fix it. The animation importer gives some indicators for looping (green, yellow, red) and a little bit of a graph when you adjust the start and end times to help you loop it.