Interactable Layer Mask not working

Unity version: 6000.0.23f

Hey there, I have a problem.

My near-far Interactor only works when everything is set to default.
What I want: As you can see in the pictures below I set up both Interaction Layer Masks (Near-Far Interactor and XR Grab Interactor) to overlap with at least one layer. On my understanding, the near-far Interactor should now be able to grab the Interactable. But it doesn’t.


The only case where it works is when I leave both Gameobject Layers (not the Interaction Layer) at default. It seems that the Interaction Layer Mask does not have any influence at all. What am I doing wrong here?

SAME ISSUES HERE Unity version: 6000.0.34f

Hey @GlaDos_sae and @alienheretic.

I think I understand what is going on, but my one question would be if the GameObject layers are different in the cases where it does not work, or if you leave it as Default and the Interaction Layer Mask still does not change what can be hovered and selected?

I ask because when it comes to the Interaction Layer Mask, this is something that is only considered during interaction processing by the Interaction Manager. To even get to that step, there has to be a regular Unity physics interaction (on the same GameObject Layer). So while the 2 layer masks are not directly related as to what the Interaction Manager filters out, the Interactor and Interactables must share at least one GameObject Layer and one Interaction Layer Mask layer to trigger an interaction.

Hopefully this explains a bit more about how it works. If you have configured things as I described and you still are not seeing it work correctly, please post screenshots of the game object layer settings as well so we can help diagnose.

I have a similar issue where it interactions only seem to work on the Default layer. I am on 6000.0.33f.

I have a gameobject on the ‘Cat’ layer, and my Direct Interactors on each controller (from the standard XR rig) are on layer Player. As far as I know, gameobject layer shouldn’t matter; it’s the interaction layer mask that should matter?

I have set the ILM on the Cat’s gameobject (it’s head) to ‘XR Interactable’, and the ILM on my Direct Interactors to ‘XR Interactable’ and ‘XR Interactor’.

However, this does not work. What DOES work is when I set the Cat gameobject’s layer to Defaut.

You say that GameObject layer actually DOES matter? Should I set the Cat and Direct Interactors to the same layer? This doesn’t seem logical

@VRDave_Unity

I think I have found the issue:

On the Direct Interactor there is an option for ‘Physics Layer Mask’. This needs to be set to the Layer you want to interact with a collider on. So, it of course was on default which is why default worked. Setting it to ‘Cat’ works now.

So you need to make sure both Interaction Layer Mask and Physics Layer Mask is correctly configured.

Hi, if you add a layer to an interactable object, this layer must be added to your specific interactor. For example, if you’re using a near-far interactor, go to XR Origin > Near-Far Interactor > Interaction Layer Mask and select your especific layer.

You must also add this layer to Sphere Interaction Caster > Physics Layer Mask and Curve Interaction Caster > Raycast Mask.