Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved Remove teleport from left hand?

Discussion in 'XR Interaction Toolkit and Input' started by mgear, Mar 25, 2022.

  1. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,988
    This should be quite simple, but nope..

    How to remove teleporting and interactor ray from left hand?
    ray creates that blue teleport reticle, even if disable most left hand features.
    (Can delete the component, but causes errors from some other unity xr scripts..)

    using this project, https://github.com/Unity-Technologies/XR-Interaction-Toolkit-Examples


    *also as a feedback, would be nice to have ready to use system, like steamvr was - didn't have to rebuild/re-invent standard vr controls..

    upload_2022-3-25_15-7-36.png
     
  2. MarkSharpe

    MarkSharpe

    Joined:
    Feb 3, 2021
    Posts:
    27
    if you're not using your left hand to teleport I would assume you're going to use it as a continuous move provider? If so, you'll need add your continuous move provider component to your XR rig. If you still don't want the line renderers active you can disable them from there. You'll need to go to your XRI defaults and assign your continuous move inputs and also go into your preset manager to assign the continuous move provider to the "Left" hand to make it move your xr rig around. upload_2022-3-29_10-23-28.png
     
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,988
    i'd prefer using right hand for teleport,
    left hand could still have the ray interactor for clicking things (but for now, would be also enough to remove that)

    if just remove those components "xr interactor, linerenderer, line visual" and gameobject "LeftTeleportController" from left hand, it breaks the controller somewhere.. not sure how or where to disable references to those parts.
    upload_2022-3-30_23-26-49.png

    i'm thinking that building the xr rig from scratch would be the only good option,
    but documentation doesn't really help much there..
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,988
    i think i found the perfect tutorial now, this should solve it:
     
  5. VRDave_Unity

    VRDave_Unity

    Unity Technologies

    Joined:
    Nov 19, 2021
    Posts:
    254
    The simplest solution is to delete the entire
    LeftTeleportController
    GameObject from under the
    LeftHand
    and make sure the
    TeleportControllerGameObject, TeleportModeActivate and TeleportModeCancel
    references in the
    ActionBasedControllerManager
    are set to
    None
    . This will produce a warning on play, but you can also edit the script to trim out the teleport functionality or add a toggle to turn this on/off depending on your own configuration.

    upload_2022-4-19_12-50-14.png

    As a side note, we are planning to release a more comprehensive template project in the very near future that will cover this scenario. We'll be posting about the project and updated XR Interaction Toolkit at that time. Stay tuned!
     
    mgear likes this.
  6. War_Tourist

    War_Tourist

    Joined:
    Dec 3, 2014
    Posts:
    8
    Hi! Was this update ever released? I'm trying to do the same thing (remove grip teleport behavior from left hand only). I don't want to remove the lefthand controller since it's used elsewhere. Thanks!
     
  7. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    511
    Wondering the same. Is there an elegant way to enable/disable Teleport at runtime?