I’ve spent two days trying to get this to work.
I’ve developed a 90 degree turn left animation (from idle->turn 90->walk or idle), and during playback in unity, I’ve noticed that the root motion doubles up the animation (180’ turn). This manifests in the game too. I’ve tried to halve the rotation of the root motion bone but this has other undesirable artefacts and feels wrong. As you can see the dog snaps back to where the root motion is really pointing.
I need the dog to be facing whatever angle the animation exits at (it may exit early if the player releases the turn key).
Maybe I’m doing this wrong, and will regret a 90degree animation? I mean, it will look a bit weird if you keep turning with 90 degree twists; but it frustrates me when things don’t behave as I’d expect them to be; so trying to understand how to make things work.
But what I can’t understand is how to make this transition properly (e.g. my turn finishes at 90 degrees, and the dog continues walking). The blue marker for root motion confirms the root motion is correct. Is it because the root motion object is a bone in the armature? should it be a standalone object? (It’s not actually connected to other bones, so not sure what the hell’s going on).
I tried making the root motion only do a 45degree turn but that then introduces worse problems.
Note - if i get rid of the root motion bone’s movement, the dog does the proper 90 degree animation, but then snaps back to the original direction before the animation plays.
OK - I think I may have a lead - and maybe some of you can easily answer these questions with “of course, you noob!”.
My root motion bone is NOT the root of the armature (e.g. it’s not the top-most parent) I think that’s causing the double rotation. It’s currently just another disconnected bone in the armature.
However, I fear that would make animation much harder - what to do with feet that MUST stay in place - e.g. where weight is on the paw, and not slide. I’ll have to hack them back as the body rotates. Also not sure how I can make the animation look nice with the spine movement.
In your case, I think you should always assign the top-most bone as the root node and assign the bone that define the root motion as the root motion node.
Yes, I did read the documentation, about 400 times! Including the more complex section with root motion and orientations, but it’s super confusing, with no visual explanation of how to setup a generic rig that contains a rotating motion and a rotating animation (nor how the structure of the rig/model should be). Lots of help / documentation focuses on humanoids and forward motion.
I tried configuring as you said, and the most interesting thing is that all the options for rotation/position get removed when I set the “Motion”->“Root Motion” bone to anything other than “None”. The above animation only worked when Rig->Root Motion was set to my rotation/motion bone.
I’ll strip this back to basics and repeat the process on a cube and see if I can recreate the problem without a large model. Good old cubie.
Yes, if you assign something to the “Root Motion Node”, the options for generating root motion will not be available.
But what’s the outcome if you configure as I said?
Actually, this configuration does work for me although I am not sure whether this is what you want to achieve.
Animation in blender
Default import setting: Generic, No Root Node, No Root Motion Node
Assign root bone to Root Node
Assign the bone which defines the root motion to Root Motion Node
@JosephHK First of all, thank you for taking the time to make a video and highlight that bug. That really helped clear things up. You should get a thousand likes
I used your video to re-assess my entire armature and bone structure.
I restructured my bones, so all animating bones existed under one topmost bone, and the root motion bone was a also a disconnected child. I then had to fix rotation issues (as I’ve got unwanted roll and mixed axis alignments (grr)), my structure is still a little messy, but following your example IT WORKED. It needs tweaking a little but it’s no longer DOUBLY rotated.
I’m not 100% sure that the generic rig bug exists for me, I did follow your lead and flip from generic-none-generic so maybe I didn’t get the chance to prove that. Do you know if Unity is aware of the bug?
I’ve also noticed that things like the root motion bone needs an object in blender to be attached to, or it doesn’t appear in unity, so I’ve added a fake axis object that sets itself as a parent to the root motion.