Definition
double GetEngineCameraTilt(string engineCameraName)
Description
This function returns the tilt 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
Tilt of the engineCameraName engine camera.
Example 1
tilt = 0.0 function Init() tilt = GetEngineCameraTilt("camera1") message = string.format("\nTilt is > %.2f" , tilt ) PrintConsole(message) end function Update() end
Returns the tilt of the “camera1” engine camera.
Example 2
--Name of script is GetEngineCameraTilt2.lua tilt = 0.0 function Init() tilt = GetEngineCameraTilt("this") message = string.format("\nTilt is > %.2f" , tilt ) PrintConsole(message) end function Update() end
In this case, “this” string in the GetEngineCameraTilt points to the camera that GetEngineCameraTilt2.lua script is attached to. For example, if GetEngineCameraTilt2.lua script is attached to a engine camera named “camera1”, “this” will be equivalent to the name “camera1”. In this example, GetEngineCameraTilt function returns the tilt of current engine camera.
GetEngineCameraTilt