How to get a bones actual position when using IK

So I am using the built in IK system with a humanoid model. I have an idle animation playing, and override the hand to point to the player with:

animator.SetIKPositionWeight(AvatarIKGoal.RightHand, 1);
            animator.SetIKPosition(AvatarIKGoal.RightHand, MyEnemy.transform.position);

Now that works fine until it comes time for me to figure out the position of the hand. I use RightHandBone.position to get the position of the bone, where RightHandBone is a public transform set in editor to the hand bone. The problem is this returns the position of the hand before the IK, as if it was still in the idle animation position.

The same thing happens if I create a new object and parent it to the hand and get the new objects position. Still returns the position of where the hand would be if it was not being effected by IK.

How can I get the real position of the hand?

Derp. I figured it out. I was getting the bone position in the OnAnimatorIK() function, as such the bone position really hadn’t been updated yet. Getting the bone position in the Update() function instead returned the bones correct location, after IK had been applied.

204534-sadpfxxxxxlagb.gifThe bones lag behind in that event enough that setting a SkinnedMeshRenderer under it to match will glitch out, needing culling. Unity should return the values in the animator class or let us pass an instance of an animator to StateMachineBehaviour and a separate gameObject this is why VR is so “anonymous” lol
204533-screenshot-2023-02-07-045638.png