Search Unity

Resolved Quest 2 Teleport Trigger 'On Activate' - only responds when grip and trigger are pressed together

Discussion in 'XR Interaction Toolkit and Input' started by tomm408, Jan 3, 2021.

  1. tomm408

    tomm408

    Joined:
    Dec 25, 2020
    Posts:
    4
    Hi, I'm using Unity 20.1.17f1, and using XR Interaction Toolkit Version 1.0.0-pre.1 (17Nov20). I'm trying to get this working on an Oculus Quest 2, and any help would be greatly appreciated.

    I'm using an Action-Based Rig, and have a plane acting as a teleportation anchor. On the teleportation anchor component, the 'Teleport Trigger' is set to 'On Select Exited', or 'On Select Entered', it works perfectly - in game the grip button teleports me to the anchor. However I can't get the Teleport Trigger 'On Activate' or 'On Deactivate' to work. It only works when I press the grip and trigger buttons together on the Quest 2 controller - pressing the trigger itself does nothing. As far as I can tell, the trigger is mapped to activate though in the XRI input settings screen (I'm using the default XRI input maps provided by Unity).

    Please could someone help me understand what's going on here, and how to fix it? I'm very new to Unity so i appreciate this may be a little advanced, and would really appreciate a patronising explain-like-im-five explanation.

    I notice the oculus quest 2 isn't listed in input devices through the XRI Default input maps - does it come under a different name? If so, where should I be looking in the documentation to find this sort of info? I find it quite confusing to navigate haha.

    Many thanks for all your help. Below are a few images of what i've described: teleport settings.png Which Binding?.png
     
    Verne33 likes this.
  2. chris-massie

    chris-massie

    Unity Technologies

    Joined:
    Jun 23, 2020
    Posts:
    231
    The Activate action requires that the object is Selected first. That is why you would need to hold the Grip first (to Select) before the Trigger will send the Activate event (upon Trigger). If you want to use the Trigger control for triggering a Teleport, you can use a separate GameObject with a different Ray Interactor and XR Controller with the desired configuration for teleportation on Select Exit/Enter. Then you can have the original one used for selecting things with the Grip control as before. This is similar to the setup we have in our WorldInteractionDemo Scene in the VR Examples project.

    The XR Controller in the Input Actions window is generic to all tracked controllers, so it should work for the Quest 2. The Oculus Touch Controller is the name of the controller device used for the Quest and Quest 2.
     
    Verne33 likes this.
  3. tomm408

    tomm408

    Joined:
    Dec 25, 2020
    Posts:
    4
    Hi Chris,

    Thanks so much for taking the time to help me with this. Embarrassingly simple haha - but really glad to have it sorted!
     
    chris-massie likes this.