找回密碼
 注冊帳號

掃一掃,訪問微社區

camera.fieldofview 視野

2015-1-4 02:57| 發布者: 楊炎| 查看: 3419| 評論: 0|原作者: 蠻牛|來自: unity3d腳本manual

摘要: 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;

相關閱讀

文章點評
相關文章
极速时时彩开奖最快的网站