Definition
SetEngineCameraTilt(string engineCameraName, float tilt)
Description
This function sets the tilt value of the engine camera engineCameraName to tilt.
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.
tilt
Specifies the engine camera tilt.
Example 1
function Init() ActivateEngineCamera("camera1") SetEngineCameraTilt("camera1", -20.0) end function Update() end
First we activate the engine camera “camera1”. Then we set the tilt of engine camera “camera1” to -20.0.
Example 2
--Name of script is SetEngineCameraTilt2.lua function Init() ActivateEngineCamera("this") SetEngineCameraTilt("this", -20.0) end function Update() end
In this case, “this” string in the SetEngineCameraTilt function points to the camera that SetEngineCameraTilt2.lua script is attached to. For example, if SetEngineCameraTilt2.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 tilt of current engine camera to -20.0.
SetEngineCameraTilt