Ejemplo n.º 1
0
    private void DoObjectGrab(object sender, InteractableObjectEventArgs e)
    {
        if (VRTK_SDK_Bridge.IsControllerLeftHand(e.interactingObject))
        {
            holdControl   = VRTK_SDK_Bridge.GetControllerLeftHand().GetComponent <VRTK_ControllerEvents>();
            stringControl = VRTK_SDK_Bridge.GetControllerRightHand().GetComponent <VRTK_ControllerEvents>();

            holdActions   = VRTK_SDK_Bridge.GetControllerLeftHand().GetComponent <VRTK_ControllerActions>();
            stringActions = VRTK_SDK_Bridge.GetControllerRightHand().GetComponent <VRTK_ControllerActions>();
        }
        else
        {
            stringControl = VRTK_SDK_Bridge.GetControllerLeftHand().GetComponent <VRTK_ControllerEvents>();
            holdControl   = VRTK_SDK_Bridge.GetControllerRightHand().GetComponent <VRTK_ControllerEvents>();

            stringActions = VRTK_SDK_Bridge.GetControllerLeftHand().GetComponent <VRTK_ControllerActions>();
            holdActions   = VRTK_SDK_Bridge.GetControllerRightHand().GetComponent <VRTK_ControllerActions>();
        }
        StartCoroutine("GetBaseRotation");
    }