I want to know coordinates of root bone in the end of animation. I tried to put unit with Animator controller programmaticaly to the scene, play animation and execute Update() several times. But coordinates are slightly different from the real. Is there method to know accurate coordinates in the end of animation?
This code should work as it should, but it doesnt work accurately:
Thanks a lot for the answer! Everything works perfectly now.
P.S. I read documentation, but I was misled by the phrase “The position is only valid when a frame has being evaluated after the SetTarget call”. Of course SetTarget() called in Update() method.
There’s no helpful information at that doc page, so I googled the method hoping someone somewhere might explain it, and all I found was a different forum thread where someone asks for an explanation and gets pointed back to this thread. Might be an idea to get someone to flesh out the docs for this feature.