正交相机的旋转

正交相机的旋转

问题描述:

我可以使用此代码旋转相机

I am able to rotate camera with this code

camera.zoom = 3//in constructor
if(camera.zoom>1)
    {
    camera.zoom-=0.01f;
    camera.rotate(15);
    }

这是在渲染,现在缩放效果正常工作,屏幕保持以当前角度旋转。如下所示。

this is done in render, Now zooming effect works properly but when zooming completes my screen is stay rotated with current angle. like below.

在您的代码片段

**camera.zoom=3;**

并且在每次迭代中,您都会通过 0.01 缩放相机,直到 camera.zoom> 1
,因此您总共需要进行20次缩放。

and in each iteration you are zooming camera by 0.01 till camera.zoom > 1 so you have total 20 iteration for zooming

然后以 18 角度旋转,在迭代后以 360 度旋转。

Then rotate with 18 degree angle after iteration it will rotate in 360 degree.