Пример #1
0
    // Updates while two colliders make contact
    void OnTriggerStay(Collider col)
    {
        // IF the Controller trigger is pressed and the pointer is on the UI element
        if (controller.GetTouchDown(SteamVR_Controller.ButtonMask.Trigger) && transform.localPosition != Vector3.zero)
        {
            if (assemblyLineSpace != null)
            {
                Debug.Log("HIT AssemblyLineSwitch");
                hands.FlipHandControls(assemblyLineSpace);
                return;
            }

            if (playSpace != null)
            {
                Debug.Log("HIT Playspace");
                hands.FlipHandControls(playSpace);
                return;
            }

            if (level != null)
            {
                Debug.Log("HIT level");
                level.StartLevel();
                return;
            }
        }
    }