开启辅助访问
 找回密码
 注册帐号

扫一扫,访问微社区

camera.fieldofview 视野

2015-1-4 02:57| 发布者: 杨炎| 查看: 2022| 评论: 0|原作者: 蛮牛|来自:

摘要 : camera.fieldofview 视野varfieldofview: floatdescription描述the field of view of the camera in degrees.相机的视野,以度为单位。this is the vertical field of view; horizontal fov varies depending on the ...

camera.fieldofview 视野

varfieldofview: float

description描述

the field of view of the camera in degrees.

相机的视野,以度为单位。

this is the vertical field of view; horizontal fov varies depending on the viewport's aspect ratio. field of view is ignored when camera is orthographic (seeorthographic).

这是垂直视野:水平fov取决于视口的宽高比,当相机是正交时fieldofview被忽略(参考orthographic).

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public void awake() {

camera.fieldofview = 60;

}

}

// set the camera's fov attached to the same game object to 60

//设置附加到同一个游戏物体上相机的视野为60

camera.fieldofview = 60;

another example using specifically the main camera.

使用专门主相机的另一个例子:

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public void awake() {

camera.main.fieldofview = 80;

}

}

// set the main camera's field of view to 80

//设置主相机的视野为 80

camera.main.fieldofview = 80;

0 0 0 0 0

相关阅读

最新评论

返回顶部