Hi all,
My question: is there a description somewhere of the exact order of operations to render a frame in Unity?
I'm interested in this because I have a problem with character animation. It seems that the transformations of bones in a character are 'lagging one frame behind'. I mean that if you read the position of a bone in LateUpdate(), that position is not the one used in the subsequent render. I think the Unity loop looks like this:
... frame x - 1 : Animate and render bones and everything else
frame x : call Updates
frame x : Update bone transforms with data from frame x - 1
frame x : call LateUpdates
frame x : Animate and render bones and everything else
frame x + 1 : call Updates ...
I noticed this when examining the position of the root node in my character animation. When you start playing a new animation in Update(), the root node position read in LateUpdate() is still the position of the old animation. The Unity documentation says "One important thing to know is that the animation system updates the Transforms after the Update() function and before the LateUpdate() function is called", but it doesn't say what the transforms are updated with: data from previous render or subsequent render?
Thanks, Mattijs