Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     // Beckon Using Fist
     if (objectToSpawn && (handObserverLeft.isFist()))
     {
         if (!GameObject.FindGameObjectWithTag("Beckon"))
         {
             DropObject(handObserverLeft.transform.position);
         }
     }
 }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        // Selection
        selectedObject = AttemptObjectSelection();


        // Spacebar or detecting a fist on right hand
        if (handObserverRight.isFist())
        {
            if (!grabbing)
            {
                AttemptGrab(selectedObject);
            }
        }
        else
        {
            if (grabbing)
            {
                ReleaseGrab();
            }
        }
    }