Search Unity

Feature Request XR toolkit two handed grab

Discussion in 'XR Interaction Toolkit and Input' started by kartoonist435, Aug 15, 2020.

  1. kartoonist435

    kartoonist435

    Joined:
    Feb 14, 2015
    Posts:
    73
    Is there a way to pick up an interactable with two hands? Not by setting up two separate colliders I'd like to have one collider and both hands be able to hold it at the same time. As it is now the second hand takes over the object and forces the first hand to release. Thanks in advance.
     
  2. doncole404

    doncole404

    Joined:
    May 26, 2020
    Posts:
    4
    i'd also like to hear any solutions for this
     
  3. mfuad

    mfuad

    Unity Technologies

    Joined:
    Jun 12, 2018
    Posts:
    335
    We've heard this request multiple times; do you mind submitting this request (if you haven't already) in our XRI public roadmap so the team can prioritize and plan appropriately? Thanks!
     
  4. kartoonist435

    kartoonist435

    Joined:
    Feb 14, 2015
    Posts:
    73
    Done!
     
    mfuad likes this.
  5. james_co

    james_co

    Joined:
    Mar 26, 2018
    Posts:
    6
    Valem recently put together a video that shows how to do this with the Unity XR Interaction Toolkit:
     
    Snuter likes this.
  6. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    At the moment, a workaround is to have two interactables that communicate to a common manager to orchestrate the two handed interaction. Also thanks for putting in a feature request! :)
     
  7. alsharefeeee

    alsharefeeee

    Joined:
    Jul 6, 2013
    Posts:
    80
  8. DugganSC

    DugganSC

    Joined:
    Feb 6, 2014
    Posts:
    7
    alsharefeeee and VRDave_Unity like this.
  9. VRDave_Unity

    VRDave_Unity

    Unity Technologies

    Joined:
    Nov 19, 2021
    Posts:
    275
    Hey @alsharefeeee,
    What @DugganSC said is correct. You can change the Select Mode to multiple and from there you have 2 options. You will want to expand the Grab Transformers Configuration area in the Inspector for the Interactable object. By default, the checkbox for Add Default Grab Transformers should be checked. This will add the XR General Grab Transformer, which supports single and multiple grabs in one. You can also add the specific Transformer you want to use, uncheck Add Default Grab Transformer and then drag the Transformer into the appropriate lists for Starting Multiple Grab Transformers or Starting Single Grab Transformers.

    The advantage of this approach, specifically for the XR General Grab Transformer, is that you can further configure options for how the object behaves when grabbed with 2 hands and turn on other features such as 2-handed scaling or movement constraints.
     
    alsharefeeee likes this.
  10. VinegarWilliams

    VinegarWilliams

    Joined:
    Feb 5, 2022
    Posts:
    1
    Has anyone figured out a solution for handlebars? I was hoping to control the rotation using two attach points, set to multiple, and putting the whole thing on a hinge joint. That didn't really work out (probably user error lol).

    Instead I'm trying to match my handlebar rotation to a vector drawn between the player's hands.
     
    Last edited: Mar 30, 2024
  11. ericprovencher

    ericprovencher

    Unity Technologies

    Joined:
    Dec 17, 2020
    Posts:
    262
    That should work fine with a dynamic attach with multi grab.

    You can also add the general grab transformer component on your grab interactable to configure 2 handed grab behavior. This is added automatically at runtime if not present, and it has different 2 hand rotation options.

    Also if you manually assign both attach transforms on the grab interactable you can chose where the controllers will latch onto during a grab.
     
    VinegarWilliams likes this.