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