Search Unity

Question Changing the Teleport Button

Discussion in 'XR Interaction Toolkit and Input' started by djfrear, Jan 10, 2021.

  1. djfrear

    djfrear

    Joined:
    Oct 23, 2015
    Posts:
    1
    Hi,

    I've been working on migrating over to the new action-based input system and got everything up and running. I have teleport available on my left hand which will only respond to the "select" action.

    I can't find out how to change this anywhere, I'd like to use a completely different button for teleport so I can maintain "grab" style actions on the "select" button.

    I've managed to get everything working so as I can use a different action to show my teleport ray and reticle using a different button, but to actually perform the teleport I still have to use the "select" button.

    Does anyone have any pointers to offer please?

    Regards, Daniel
     
  2. rmcs87_unity

    rmcs87_unity

    Joined:
    Mar 7, 2019
    Posts:
    2
    Hey Djfrear.

    I changed it to the Analog UP. Change the select usage of the controller that you use to the teleport ray.
    upload_2021-1-24_21-43-21.png
     
  3. Domcoc

    Domcoc

    Joined:
    Sep 1, 2017
    Posts:
    11
    Bump
    I've similar issue too. I really need two distinct actions, one for teleport one for grab. But it seems that is is absolutely impossible to change the Action associated to the teleport. Unfortunately the solution proposed by rmcs87 is not effective, since I still have the same Select Action binded to both the teleport (performed by the TeleportationProvider) and the Interaction (provided by XR Grab Interactable). What am i missing?
     
    lior3790 likes this.
  4. lior3790

    lior3790

    Joined:
    May 25, 2022
    Posts:
    1
    Maybe creating a designated script is the solution?
    seems like a long way to go to achieve trivial behavior of deciding which button should affect teleportation
     
  5. djhatvr

    djhatvr

    Joined:
    Sep 22, 2019
    Posts:
    53
    Agreed
     
  6. bsmithenc

    bsmithenc

    Joined:
    May 12, 2023
    Posts:
    1
    Same issue here. It shouldn't be taking me two full work days to simply change the controls
     
  7. kyle_v

    kyle_v

    Unity Technologies

    Joined:
    May 24, 2016
    Posts:
    21
    Hi!
    To change the teleport interactor's input without affecting the other grab interaction, you can put the teleport interactor on a child of the controller and then give the child it's own Action Based Controller. Since it's a child transform it won't need to update its position and you can turn off the "Enable Input Tracking" field and just turn on the "Enable Input Actions" to set a different mapping for Select.

    These screenshots are from the Demo scene in Starter Assets sample (taken from package version 2.3.2) if you want to try it out.

    upload_2023-6-6_10-58-51.png upload_2023-6-6_10-17-51.png