setDefaultCamera: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \{\{GameCategory *\| *arma3 *\| *(New )?Scripting Commands\}\}" to "")
m (Text replacement - "\| *(arg|eff|mp|serverExec|gr[0-9]) *= *(.*) * *\|([^=0-9]{12})" to "|$1=$2 |descr=$3")
Line 7: Line 7:
|gr1= Camera Control
|gr1= Camera Control


| Sets the position and direction for the camera used after camera is set on no object (log out view when leaving MP game for example)
|descr= Sets the position and direction for the camera used after camera is set on no object (log out view when leaving MP game for example)


|s1=  '''setDefaultCamera''' [position, direction]
|s1=  '''setDefaultCamera''' [position, direction]

Revision as of 22:20, 13 June 2021

Hover & click on the images for description

Description

Description:
Sets the position and direction for the camera used after camera is set on no object (log out view when leaving MP game for example)
Groups:
Camera Control

Syntax

Syntax:
setDefaultCamera [position, direction]
Parameters:
position: PositionASL - position of the camera
direction: Array - format Vector3D - direction of the camera
Return Value:
Nothing

Examples

Example 1:
setDefaultCamera [[5000,5000,200],[1,1,-1]];
Example 2:
Lift camera 100m up above current player position and point downwards: setDefaultCamera [ATLtoASL (player modelToWorld [0,0,100]),[0,0,-1]];

Additional Information

See also:
camCreatecameraOncameraViewcameraEffectcameraEffectEnableHUDswitchCamerapositionCameraToWorldcameraInterestsetCameraInterestgetEditorCameramapCenterOnCamerapreloadCamerarestartEditorCamera

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note