Definition
double GetEngineCameraNearClipPlane(string engineCameraName)
Description
This function returns the near clip plane of the engineCameraName engine camera.
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.
Return Value
Near clip plane of the engineCameraName engine camera.
Example 1
ncp = 0.0 function Init() ncp = GetEngineCameraNearClipPlane("camera1") message = string.format("\nNear Clip Plane is > %.2f" , ncp) PrintConsole(message) end function Update() end
Returns the near clip plane of the “camera1” engine camera.
Example 2
--Name of script is GetEngineCameraNearClipPlane2.lua ncp = 0.0 function Init() ncp = GetEngineCameraNearClipPlane("this") message = string.format("\nNear Clip Plane is > %.2f" , ncp) PrintConsole(message) end function Update() end
In this case, “this” string in the GetEngineCameraNearClipPlane points to the camera that GetEngineCameraNearClipPlane2.lua script is attached to. For example, if GetEngineCameraNearClipPlane2.lua script is attached to a engine camera named “camera1”, “this” will be equivalent to the name “camera1”. In this example, GetEngineCameraNearClipPlane function returns the near clip plane of current engine camera.
GetEngineCameraNearClipPlane