Update() child rotation first leads to flickering
Hello everybody,
I think I might have an advanced UnityEngine question. I have a main character figure, a human body of which I assign every bone's rotation manually in the Update() routine simply via
private void Update()
{
transform.rotation = newRotation;
}
The background why doing this is not important, it just has to be this way. The problem arises, when the Update() routines run from child to parent, say hands to shoulders. There is heavy flickering, Parkinson-like. I strongly think it is because the (say) hand gets updated, then the arm which also rotates the hand, then the shoulder which rotates both. This goes down to the root bone or hip.
Assigning the rotations the order child->parent makes way more sense than vice versa, due to this fact. But what I don't unterstand is the flickering.
It looks like the Update() routine sometimes calculates every body part, next run not all dependencies, so the hands flicker back and forth. To get a better imagination:
When the child body part gets a strong new rotation value via manual assignment, let's say strong hand movement, it looks fine. When the hands are kept at constant rotation, but shoulders are moved, there is heavy jumping of hands.
Any experience or idea?
Your answer
Follow this Question
Related Questions
Game object rotate with the camera on y axis 0 Answers
After gameObject rotation is set, it changes to a different value 1 Answer
Check GameObject rotation in Y axis when OnTriggerEnter 1 Answer
Locking facing direction or changing it after following the mouse position 0 Answers
Rotate GameObject with children around itself on mouse drag 1 Answer