How Can I Use My Own Character

Greetings, hello!

I know, this is not scope of this course but I reaaaly need help and I’ll be appreciate for any comment.

When Rick use Blend rangebar in Blend Tree, imported character moving perfectly between Idle - Walk - Run cycles. My character doing this too, seems doing walk and run cycles but it’s not moving in preview page. I guess Unity couldn’t generate movements well enough.

Is there any option I’m missing?

image

Blend trees can be tricky to get right. It’s best to make sure that there is some similarity to the animations between the walk and run, specifically in the feet. If the walk animation starts with the left foot forward, then the run animation also needs to start with the left foot forward. It’s as much a fine art as it is a formula to get the animations just right. Also bear in mind that our NavMeshAgent will seldom drive the characters at the very slow speeds that go from idle to the first transition, in our game, the character will mostly be moving at a full walk or a full run.

From there, the next handy trick is to look at each animation in the import dialogue under Average Velocity. It will be represented as a Vector3, and if the animation is aligned properly should be 0,0 and a positive number.


Use around 1/2 of that number as the threshhold for the blend tree

Thanks for your answer, it helped a lot and I’ll keep that in my mind.
But It seems plenty of ways to prepare character for game.
First, I tried to animate walk and run cycles in their own position (not moving to particular location) and tried to use them. Then I noticed it is not possible to use avarage velocity with that way. I imported assets that the course provide us into Blender, and I saw walk and run animations are moving and that’s why they have average velocity values.

And then I animate my characters animations with that way, but this time I had another problems. And I couldn’t figure which way I should choose. I don’t want to ask more questions out of scope of this course.

At least, would you please inform me about what kind of animation I should use with NavMesh for mobile game? Animating in their own position or animating with movement? Or maybe If you know any article / document to explain these things, that would be great. Resources I’ve reached, cause more question unfortunately :roll_eyes:

In general, when working with the NavMeshAgent, it’s better NOT to use root motion, as it requires a bit of extra work on the side. You have to get the NavMeshAgent’s desired position, manually turn the character when needed to face that desired position, and then set the animation speed. I think I’m leaving out a step in there, it’s been a while. Basically, the Agent says where to go, and you have to do the calculations and instruct the animator to play the move animation. The Animation moves the character, but not the agent… so you have to reset the agent’s position on the path as well. It’s complicated.
I like to use animations that have root motion in them while still unchecking the use root motion box. This ensures that I can get the quick and dirty calculations for the z axis of the root motion (which should be properly synched to the character’s movement) and then the animation is a response to the motion, not the other way around.

Thanks a lot @Brian_Trotter, I appreciate.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms