Cannot use XRDirectInteractor with XRSimpleInteractable

Using unity 2020.03.9f1 with XR Toolkit 1.0.0-pre.3

I can get XRRayInteractor to work with both XRSimpleInteractable and XRGrabInteractable, but when I am using the XDirectInteractor it only works with XRGrabInteractable. The layers for both the simple interactable and direct interactor are set to everything.

For example, I have a ball in the scene which is using XRGrabInteractable, and OnHoverEntered is triggered for it when I move the controller mesh into it. When I move the controller into the XRSimpleInteractable, OnHoverEntered is not called (tested with a Debug.Log in a custom subclass). I looked into the code for the interactables, interactors, and manager; and I didn’t see anything which would prevent this.

I have a scene set up with the controllers having:

  • XR Rig

  • Main Camera

  • LeftHand Controller

  • XR Controller

  • XR Direct Interactor

  • Sphere Collider

  • RightHand Controller

  • XR Controller

  • XR Direct Interactor

  • Sphere Collider

  • LeftHand Ray

  • XR Controller

  • XR Ray Interactor

  • RightHand Ray

  • XR Controller

  • XR Ray Interactor

I have a static object in my scene Create_with_VR_Starter_Scene/STATIC/Room_Modern/Room_Modern_Door/Room_Modern_DoorHandle which has both a box collider and XRSimpleInteractable.

I’ve zipped my project and uploaded it here if anyone wants to test it out: 209.58 MB file on MEGA

If I add a rigidbody to the door handle it works. I was under the impression that the rigid body of the controller would be enough to trigger the collision zone. I guess the reason the ray interactor works is because it does an explicit raycast.

1 Like

Thank you very much!! I had a very similar situation (direct grabbing of XRGrabInteractables worked, but direct activation of XRSimpleInteractables did not), and 2 days of googling still had me stumped until I finally found your note about adding a rigid body to the XRSimpleInteractable GameObject.