Niche Question about VR Gamedev in Unity

Hello all!

I’m developing a VR Game using the XR Interaction toolkit (perhaps my initial error!). One of my objectives is to implement a two-handed grab system, especially for weapons. The XR Interactables provide a handy ‘Select mode’ feature that I’d like to utilize.

Here’s the issue: In Unity, the “first hand” directly controls the object’s pivot, while the “second hand” adjusts its rotation around that pivot. It works well generally, but imagine holding a rifle – left hand on the foregrip. If I release my right hand, the left hand unexpectedly takes over as the “first hand,” altering how the rifle is controlled.

What I aim to achieve is:

Grab the rifle’s grip with my right hand (which becomes the primary hand).

Hold the foregrip with my left hand (secondary hand).

If I release the right hand, I want the left hand (still on the foregrip) to now control the rifle’s pivot as the primary hand.

Later, if I grab with my right hand again, it should resume its role as the primary hand, with the left reverting to secondary.

So essentially, I need to be able to, in script, select what interactor is the primary hand, and what interactor is the secondary hand.

Does this make sense? I hope it does! I’d appreaciate any help I can get! Thanks!