Camera翻译:Yīm
- actualRenderingPath
- allCameras
- aspect
- backgroundColor
- cameraToWorldMatrix
- clearFlags
- CopyFrom
- cullingMask
- current
- depthTextureMode
- depth
- farClipPlane
- fieldOfView
- layerCullDistances
- main
- nearClipPlane
- OnPostRender
- OnPreCull
- OnPreRender
- OnRenderImage
- OnRenderObject
- OnWillRenderObject
- orthographicSize
- orthographic
- pixelHeight
- pixelRect
- pixelWidth
- projectionMatrix
- rect
- renderingPath
- RenderToCubemap
- RenderWithShader
- Render
- ResetAspect
- ResetProjectionMatrix
- ResetReplacementShader
- ResetWorldToCameraMatrix
- ScreenPointToRay
- ScreenToViewportPoint
- ScreenToWorldPoint
- SetReplacementShader
- targetTexture
- velocity
- ViewportPointToRay
- ViewportToScreenPoint
- ViewportToWorldPoint
- worldToCameraMatrix
- WorldToScreenPoint
- WorldToViewportPoint
Camera.rect 矩形
var rect : Rect
Description描述
Where on the screen is the camera rendered in normalized coordinates.
相继被渲染到屏幕规范化坐标中的位置。
The values in rect range from zero (left/bottom) to one (right/top).
Rect的范围总0(左/下)到1(右/上)。
// Change the width of the viewport each time space key is pressed
//每次按下空格键时改变视口宽度
function Update () {
if (Input.GetButtonDown ("Jump")) {
// choose the margin randomly
//随机选择边缘
var margin = Random.Range (0.0, 0.3);
// setup the rectangle
//设置矩形
camera.rect = Rect (margin, 0, 1 - margin * 2, 1);
}
}
最后修改:2011年3月6日 Sunday 20:24