Here is my test code:
Animator animator;
void Start()
{
animator = GetComponent<Animator>();
animator.SetTarget(AvatarTarget.Root, 1);
}
void Update()
{
Debug.Log(animator.targetRotation.ToString("F4"));
}
I have this attached to a human character that just walks in a straight line (actually he turns back and forth while walking, but is facing the same direction at start and end of each loop). I thought animator.targetRotation would continue to return the same value as long as SetTarget didn’t change.
I’m trying to figure out “at the end of the current animation state/loop, what position will my character be facing”. Is this not the correct method, and if not, is there another way or does this info just not exist?