Search Unity

Question multiple interactors

Discussion in 'XR Interaction Toolkit and Input' started by beatdesign, Oct 3, 2020.

  1. beatdesign

    beatdesign

    Joined:
    Apr 3, 2015
    Posts:
    137
    Hi everyone,
    I essentially have the same question of BentelAnnR:

    I was wondering which is the most correct way of managing multiple XR interactors that I want to use with the same controller.
    I want to be able to both grab objects with my hands and interact with them through the laser.
    The way in which all the tutorials and example projects do this stuff is by having multiple controllers, each one having a different interactor (one for XR Ray Interactor, one for XR Direct Interactor, one for XR Teleport), because only one interactor component can be added to an object having an XR Controller.
    So eventually the same XR Rig will have like 4 or more controllers. Is that the only correct way to realize multimodal interactions or is there another one?

    Thanks a lot
     
    jeremyco likes this.
  2. cgaunce

    cgaunce

    Joined:
    Feb 27, 2018
    Posts:
    5
    Also looking for a solution here. The documentation says that you can toggle between multiple interaction managers but I'm not clear how.

    From Unity documentation:
    Every Scene that uses the XR Interaction Toolkit needs at least one Interaction Manager to facilitate interaction between Interactors and Interactables. By default, Interactors and Interactables reference the first Interaction Manager they find in the Scene if you don’t specify one. You can also break up larger Scenes with multiple Managers or turn specific ones on and off to enable sets of interaction.

    I've attempted to turn off and on managers and controllers separately with no success. I end up breaking something each time.

    Does anyone know how this is done?
     
    beatdesign likes this.
  3. RogueAsgard

    RogueAsgard

    Joined:
    Apr 10, 2020
    Posts:
    2
    Also looking on the interwebs for any insight into using ray and grab interactors on the same controller. Also, switching between them. Unity 2020.3.
     
    wwaero and beatdesign like this.
  4. punavuori

    punavuori

    Joined:
    May 2, 2018
    Posts:
    1
    Hi there,

    The way to have ray and grabbing can be done by separate controllers in one hand, see the example below. Example is using ActionbasedControllerManager script in a parent GameObject to control which controller is active. If you need different functionality(most likely you do) be sure to modify or make your own script and also tune inputs accordingly.

    https://github.com/Unity-Technologies/XR-Interaction-Toolkit-Examples
     
    jatayumuw likes this.