Пример #1
0
        void CheckTouch()
        {
            touch = Input.GetTouch(0);
            ray   = Camera.main.ScreenPointToRay(touch.position);

            if (Physics.Raycast(ray, out hit))
            {
                Debug.Log("Touch Hit " + hit.collider.gameObject.name);
                nextFace = hit.collider.gameObject.GetComponent <PlaneteCamera>();

                if (nextFace != null && touch.phase == TouchPhase.Ended)
                {
                    if (planeteView == true)
                    {
                        nextFace.ActivatePSFB();
                        foreach (PlaneteCamera faces in raycastFaces)
                        {
                            faces.gameObject.GetComponent <Collider>().enabled = false;
                        }

                        facesSpeed    = rotationSpeed * 0.33f;
                        rotationSpeed = facesSpeed;
                    }

                    CameraTransition(nextFace);
                    planeteView = false;
                }
            }
        }
Пример #2
0
        void CameraTransition(PlaneteCamera next)
        {
            actualIndex = next.index;

            if (oldFace != null)
            {
                oldFace.vCam.Priority = 0;
            }
            currentFace = next;
            currentFace.vCam.Priority = 20;
            baseVCam.Priority         = 0;
            oldFace = currentFace;
        }