Пример #1
0
    void OnScreenDrag(UUIEventListener listener)
    {
        if (mainBall == null)
        {
            return;
        }
        Vector2 delta = UIHelper.GetListenerDelta(listener);

        mainBall.Rotate(Vector3.up, delta.x);

        m_cameraCtrl.RotateX(delta.y);

        //m_mainCamera.transform.position = Vector3.Lerp(m_mainCamera.transform.position, transform.position + cameraPos, 0.5f);
        //m_mainCamera.transform.forward = mainBall.forward;

        //Vector3 eulr = Camera.main.transform.rotation.eulerAngles;
        //eulr.x -= delta.y;
        //Camera.main.transform.rotation = Quaternion.Euler(eulr);
    }