Animator blocking bone manipulation.
So I've been racking my brain all night trying to figure out what is going on with the Animator.
Some facts to start with:
1) I'm using Unity 2018.1.0f2
2) I've recently added a walking animation to my mech model
3) I have a script that rotates the torso bone of my mech (which worked before the animation was added)
4) When the Animator is active, the script cannot rotate the torso, and I cannot rotate it manually either.
5) When the Animator is inactive, the script can rotate the torso, I can rotate it manually as well.
6) If I change a value in the animator (such as a bool) while the game is running, the animator performs as it should, but I still cannot manipulate the torso bone.
7) If I change a state's property (such as setting Write Defaults to false and then back to true), the animator will reset for all mech actors using it, but now everything works as intended: The mech animates, the script can rotate the torso, and I can manually rotate the torso as well.
So can someone explain to me what is going on? From what I can understand, the animator is resetting the transform of the torso bone at the end of every frame, but once I reset it, it stops?
After investigating some, it looks like once I "re-initialize" the animator, I'm able to manipulate every bone that the animator is controlling, including bones such as the legs which will animate in their newly changed location.
Optimally, I'd just like to make it so I can continue to manipulate the bones even when the animator is doing it's thing. Is there some setting that I'm overlooking somewhere?
Answer by Blastome · Jun 04, 2018 at 02:11 PM
After taking a couple stabs around the place, it looks as though there was a bone in my idle animation that had keyframes even though the bone didn't exist anymore. Removing the bone keyframes and exporting a whole new model with the animations seemed to fix it, but applying the animations to the old model did not.
The animator now behaves as it should and I can once again manipulate the bones as I need to without issue.
Your answer

Follow this Question
Related Questions
Confused about animations 1 Answer
Unity 5.6 - Get list of animations 1 Answer
Animator Check the end of an animation 1 Answer
Animator is not firing transitions. 0 Answers
NEED HELP ANIMATING PLAYER MOVEMENT 0 Answers