Ejemplo n.º 1
0
        // Update is called once per frame
        void Update()
        {
            // Handle firing
            if (fired)
            {
                CmdFire();
                fired = false;
            }
            VRTK_InteractableObject interactableObject = GetComponent <VRTK_InteractableObject>();

            if (interactableObject.GetSecondaryGrabbingObject() && strayFactor != TwoHandStrayFactor)
            {
                print("SecondHand Grabbed");
                strayFactor = TwoHandStrayFactor;
            }
            else if (!interactableObject.GetSecondaryGrabbingObject() && strayFactor != OneHandStrayFactor)
            {
                print("OneHand Grabbed");
                strayFactor = OneHandStrayFactor;
            }
        }