コード例 #1
0
    /// <summary>
    /// Check for input from the player's hands in the form of sucessful raycasts.
    /// </summary>
    void getHandInput()
    {
        if (hands.CheckHit() == true)
        {
            activeObjectLeft  = hands.CollisionObjectLeft; //Would this cause previously used objects to raise as well, if the variable is not cleared?
            activeObjectRight = hands.CollisionObjectRight;

            //Left hand
            if (hands.palmIsDownLeft)
            {
                Debug.Log("Left palm is Down");
                lowerPin(activeObjectLeft);
            }

            else
            {
                raisePin(activeObjectLeft);
            }

            //Right hand
            if (hands.palmIsDownRight)
            {
                Debug.Log("Right palm is Down");
                lowerPin(activeObjectRight);
            }

            else
            {
                raisePin(activeObjectRight);
            }
        }
    }