Search Unity

Question Ray Interactor with Grip for grab and stick up for teleport on the same controller?

Discussion in 'XR Interaction Toolkit and Input' started by R1PFake, Feb 28, 2021.

  1. R1PFake

    R1PFake

    Joined:
    Aug 7, 2015
    Posts:
    542
    I try to make a controller with a ray interactor that uses the ray for interactions both grab (with the grip button) but also for teleport but start the teleport with a different button or with the stick up movement if possible.

    The XR Controller has a setting for select usage, but in this case I would need two different settings grip for grab and stick up for teleport (since both are started by the "select" method).

    It should also be possible to teleport while still holding the grab object in the same controller.

    So am I missing something obvious or is this not supported by the toolkit?

    (I tried to search but didn't find an answer, maybe I used the wrong keywords?)
     
  2. MitchDerise

    MitchDerise

    Joined:
    Feb 20, 2020
    Posts:
    1
    I experimented with this for a bit, because I have been stuck on this same problem. I was not able to find anything currently in the settings allowing for this naturally, however I was able to create multiple controllers and have a script enabling/disabling controllers each with different select methods.

    My scipt will disable the raycast on start so that I can grab objects with grip, but when a certain button is held it will enable the raycast with trigger and the select input.

    Hope this helps!
     
    R1PFake likes this.