Trying to track the position and rotation of the head and hands when using hand tracking in unity and have been struggling to find the specific gameObject for the hands that moves and rotates in the game space. Head was no issue, but the parent of all the capsules and spheres that make up the default hands doesn’t move and the capsules and spheres only appear at run time (and the emulator doesn’t support hand tracking so I can’t check if they move or rotate without building to apk).
I was able to get my system to track the wrist sphere gameObject of the hand directly, but only the position, as apparently the wrist (and palm) spheres don’t rotate when the user rotates their hands. Does anyone know which gameObject in the hierarchy can be used to track the general rotation of the user hands? Otherwise I can’t broadcast the hand rotation to the other users so they can see the hand rotation of each other.
Any help would be greatly appreciated, and am happy to provide more details if necessary.
EDIT: Apparently writing this post inspired me to figure it out. Here is thekey code I needed for anyone else in the future:
var handState = NRInput.Hands.GetHandState(HandEnum.LeftHand); //cant be blank, so default to left.
handState = NRInput.Hands.GetHandState(HandEnum.RightHand);
var handPose = handState.GetJointPose(HandJointID.IndexProximal);
transform.position = handPose.position;
transform.rotation = handPose.rotation;