- Home /
The question is answered, right answer was accepted
Root Transform Position (XZ) Loop Match not match generic run animation
Why isn't the animation looping in xz position?
I made a running animations in Blender for inverse kinematic. The whole skeleton runs in place, movement in space is given only by the Root bone = father of all other bones, which I assign as the root bone in Unity ( in Rig FBX import setting Tab ). But the animation doesn't match XZ position loop. I do not understand - why?
My running animations I made in Blender - video preview. ( side animations are slightly different - it`s ok)
I tested it in the game ( you can watch the video ). Red Sphere - Position of whole object that takes position of Root Bone ( Apply Root Motion in Animator setting do it ), Green - Position of root motion. All other Spheres represent different vectors from mouse position ray cast.
Position of object ( Red Sphere ) lags behind the root bone ( Green sphere ) and it cause problem because we see how further loops of walk animations start at position behind and it cause teleport back effect.
Detailed info about my setup:
Code block that execute inverse kinematic ainmation in Blend Tree:
float blendTree_X = Vector3.Dot(target, transform.right);
float blendTree_Y = Vector3.Dot(target, transform.forward);
anim.SetFloat("X", blendTree_X, 0.1f, Time.deltaTime);
anim.SetFloat("Y", blendTree_Y, 0.1f, Time.deltaTime);
Answer by fourthrones20 · May 14, 2021 at 11:58 AM
Loop Match XZ must be red because in walk animation root move all pose and can't be the same position it was at start. But problem solving is simple - I ahd to add avatar to my animator in component list of my Character object
Follow this Question
Related Questions
Adding animations in blender to mixamo rig and using it then in unity 3 Answers
Animating both mesh and armature in Unity with imported animation from blender 2 Answers
Unity 5.x not import Blender Animations to well in any format 1 Answer
Some transforms do not match properly in FBX animations 0 Answers
Character from Blender error 0 Answers