- Home /
Rotate a child bone during animation?
I'm trying to rotate a single child bone during an animation. It worked when I used AddMixingTransform, RemoveMixingTransform ,but that was only because the previous animation did not have the parent of the child being animated.
Basically my character is tilting their body and when this happens the original rotation of the head is lost.
AddMixingTransform, RemoveMixingTransform did not solve the problem.
I'm using C#.
Thanks in advance!
The problem has been fixed! You need to set recursive to false so that it does not animate all children of the parent bone. For example
anim["Still_$$anonymous$$otion"].Add$$anonymous$$ixingTransform(Upper_Body,false);
Will not animate the head.
If you just want to rotate a bone manually (by setting it's eulerAngles or transform.rotation, or whatever), then all you need to do is to apply the rotation in LateUpdate after all rotations from animations have finished.
Answer by Kaskorian · Jul 15, 2017 at 04:01 PM
I don't know if this will solve your Problem, but if you Change the Rotation in the LateUpdate function it will override the Animation changes/movement.
Gl