Definition
SetEngineCameraFarClipPlane(string engineCameraName, float farClipPlane)
Description
This function sets the far clip plane value of the engine camera engineCameraName to farClipPlane.
Parameters
engineCameraName
Specifies the name of the engine camera. You can also use the name “this” for this parameter. In this case, “this” refers to the camera object that this script is attached to.
farClipPlane
Specifies the far clip plane of engine camera. This value must be greater than 0.0.
Example 1
function Init() ActivateEngineCamera("camera1") SetEngineCameraFarClipPlane("camera1", 20.0) end function Update() end function Update() end
First we activate the engine camera “camera1”. Then we set the far clip plane of engine camera “camera1” to 20.0.
Example 2
--Name of script is SetEngineCameraFarClipPlane2.lua function Init() ActivateEngineCamera("this") SetEngineCameraFarClipPlane("this", 20.0) end function Update() end
In this case, “this” string in the SetEngineCameraFarClipPlane points to the camera that SetEngineCameraFarClipPlane2.lua script is attached to. For example, if SetEngineCameraFarClipPlane2.lua script is attached to a engine camera named “camera1”, “this” will be equivalent to the name “camera1”. In this example, we activate the current engine camera (for example, “camera1”). Then we set the far clip plane of current engine camera to 20.0.
SetEngineCameraFarClipPlane