Definition
ActivateEngineCamera(string engineCameraName, float endTime[optional])
Description
Engine cameras are created in Vanda engine using the Insert > Camera menu. Engine cameras are not enabled by default. To activate these cameras, you must use the ActiateEngineCamera function.
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.
endTime
By default, ActivateEngineCamera function enables the camera engine indefinitely. This parameter allows you to activate the engine camera for endTime. After endTime, the third-person or first-person physics camera is activated. This parameter is optional and must be equal to or greater than 0.0.
Example 1
--Script name is thisEngineCamera.lua
function Init()
ActivateEngineCamera("this", 5.0)
end
function Update()
end
In this case, “this” string in the ActivateEngineCamera points to the camera that thisEngineCamera.lua script is attached to. For example, if thisEngineCamera.lua script is connected to a engine camera named “camera1”, “this” will be equivalent to the name “camera1”. ActivateEngineCamera function activates the engine camera for 5.0 seconds, after which the first-person or third-person physics camera is activated.
Example 2
--Script name is camera1EngineCamera.lua
function Init()
ActivateEngineCamera("camera1")
end
function Update()
end
In this case, the ActivateEngineCamera function activates engine “camera1” – if it exists – indefinitely.
ActivateEngineCamera