Ejemplo n.º 1
0
 private void Update()
 {
     if (VRInput.GetDown(GenericVRButton.Hand, handedness))
     {
         Grab();
     }
     else if (VRInput.GetUp(GenericVRButton.Hand, handedness))
     {
         Drop();
     }
 }
Ejemplo n.º 2
0
    private Queue <Vector3> velocityInputs = new Queue <Vector3>(); //calculate to handle throwing


    private void Update()
    {
        UpdateVelocity();
        print(velocityInputs);

        if (VRInput.GetDown(GenericVRButton.Hand, handedness))
        {
            Grab();
        }
        else if (VRInput.GetUp(GenericVRButton.Hand, handedness))
        {
            Drop();
        }
    }
Ejemplo n.º 3
0
    private void Update()
    {
        UpdateVelocity();

        if (VRInput.GetDown(GenericVRButton.Hand, handedness))
        {
            Grab();
        }
        else if (VRInput.GetUp(GenericVRButton.Hand, handedness))
        {
            Drop();
        }

        if (grabbedComponent)
        {
            grabbedComponent.CheckForUse();
        }
    }