Esempio n. 1
0
        public void ZoomChanged(object sender, OrientPosEventArgs e)
        {
            if (e.Pitch == 0)
            {
                lastFovy = e.Pitch;
            }

            float sensitivity = 0.2f;

            float angle   = e.Pitch - lastFovy;
            float tmpFovy = fovy + angle * sensitivity;

            if (tmpFovy > 1 && tmpFovy < 179)
            {
                fovy = tmpFovy;
                _scene.UpdateFovy(tmpFovy);
            }
            lastFovy = e.Pitch;
        }