Пример #1
0
    private void FindHandsAndColliders()
    {
        // Finding the hand object
        if (SceneManager.GetActiveScene().name == "2 - VRHandDemo" ||
            SceneManager.GetActiveScene().name == "1 - VowelPracticeVR")
        {
            hands = GameObject.Find("LeapHandController");
        }
        else
        {
            hands = GameObject.Find("HandModels");
        }

        colliders = hands.GetComponent <FindColliders>();
    }
Пример #2
0
    private void FindHandsAndCollisionScripts()
    {
        // Finding the correct hand object - the hands have different names for desktop & VR
        if (SceneManager.GetActiveScene().name == "2 - VRHandDemo" ||
            SceneManager.GetActiveScene().name == "1 - VowelPracticeVR")
        {
            hands = GameObject.Find("LeapHandController");
        }
        else
        {
            hands = GameObject.Find("HandModels");
        }

        // Finding the colliders - can use only what we need
        colliders = hands.GetComponent <FindColliders>();

        // Finding the hand closure script
        fingers = hands.GetComponent <HandClosureChecking>();
    }
Пример #3
0
    private void FindHandsAndCollisionScripts()
    {
        // Finding the overall hand object
        if (SceneManager.GetActiveScene().name == "2 - VRHandDemo" ||
            SceneManager.GetActiveScene().name == "1 - VowelPracticeVR")
        {
            hands = GameObject.Find("LeapHandController");
        }
        else
        {
            hands = GameObject.Find("HandModels");
        }

        // Colliders for each hand
        colliders = hands.GetComponent <FindColliders>();

        // Finding the hand closure script
        fingers = hands.GetComponent <HandClosureChecking>();

        // Seperate hands
        //leftHand = GameObject.Find("RigidRoundHand_L");
        rightHand = GameObject.Find("RigidRoundHand_R");
    }