InputSystem XR and child gameobject offsets

I’m trying to set up an XR-driven IK rig for my avatar. In my scene I have a playspace with an HMD, Left Controller, and Right Controller as my tracked nodes. These track perfectly fine, and I’m able to use them directly as targets for my IK Rig on my avatar using the new Animation Rigging Constraints. The problem I’m having comes about when I try to set the targets to child gameobjects under the nodes.

I have a Head Target, Right Hand Target, and Left Hand Target as child gameobjects beneath the HMD, Right Controller, and Left Controller respectively. I’m using these child gameobjects as offsets to line up the avatar’s hands and head with the user’s hands and head. When I run the scene, the hands and head of the avatar are frozen in the starting position of the offset gameobjects. I’m not sure why the Chain IK and Two Bone IK constraints would work for the tracked nodes, but not the children beneath them. When I turn off the tracked pose and move the targets manually in the scene view, the avatar’s hands and head follow correctly.

Here’s a screenshot of my Head IK setup:
5116835--505229--chainik.png

The hierarchy:
5116835--505232--hierarchy.png

The hmd node:
5116835--505235--hmd.png

Hi,

I think the problem here is that the “Head”, the “Right Hand” and the “Left Hand” game object are not evaluated in the animation stream. I don’t know exactly how you freeze the position of these game objects, but it’s possible that the initial position has been snapshot in the Animation Rigging stream instead of the offset you set afterwards…

For performance reasons, we do not add game objects properties in the animation stream unless they are animated, or unless Animation Rigging has identified it as a constraint dependency (read or write).

You can add a RigTransform component to the intermediate objects in your rig to get changes to the GameObject properties to be considered.

1 Like