Search Unity

Question Transferring an interactable from one XRSocketInteractor to another?

Discussion in 'VR' started by KylePCT, Feb 15, 2021.

  1. KylePCT

    KylePCT

    Joined:
    Jun 12, 2017
    Posts:
    2
    Hello all,
    I am creating a VR experience where you can use a drill to put bolts back into a wheel. How would I go about removing the bolt from the drill's XRSocketInteractor to the wheel's XRSocketInteractor?

    I've tried disabling the components temporarily but still no cigar. I would love some insight on how I could accomplish this, thanks all!

    Unity version: 2019.4.8f1
    XRInteractionToolKit: preview 0.9.4

    See images below for a screenshot, the drill picks up the bolt (highlighted green) fine but cannot put it back into another slot as it's locked into the drills slot.

    .
    Capture.PNG Capture.PNG
     
  2. WillemMahy

    WillemMahy

    Joined:
    Dec 18, 2016
    Posts:
    5
    I am also facing this problem.
    In fact we need to know how to perform the following 2 basic operations from script:

    1. How to unselect ('move out') an interactable from the XRSocketInteractor that has it selected.
    2. How to select ('move in') an interactable into an 'empty' XRSocketInteractor (NOT at startup, i.e. NOT using StartingSelectedInteractable property from XRSocketInteractable).