Why isn’t the animation looping? I made a running animation 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 pos 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.
Loop optimization graphs
Blender bone orientation + FBX export settings.
Root Bone assignment.
Code block that execute inverse kinematic ainmation in Blend Tree:
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);```