setDefaultCamera: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma3 |Game name=
| arma3


|1.10|Game version=
|1.10


|gr1 = Camera Control |GROUP1=
|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) |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)


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


|p1= position: [[PositionASL]] - position of the camera |PARAMETER1=
|p1= position: [[PositionASL]] - position of the camera
|p2= direction: [[Array]] - format [[Vector3D]] - direction of the camera |PARAMETER2=
|p2= direction: [[Array]] - format [[Vector3D]] - direction of the camera


| [[Nothing]] |RETURNVALUE=
| [[Nothing]]


|x1= <code>[[setDefaultCamera]] [[5000,5000,200],[1,1,-1]];</code> |EXAMPLE1=
|x1= <code>[[setDefaultCamera]] [[5000,5000,200],[1,1,-1]];</code>


|x2= Lift camera 100m up above current player position and point downwards:
|x2= Lift camera 100m up above current player position and point downwards:
<code>[[setDefaultCamera]] [<nowiki/>[[ATLtoASL]] ([[player]] [[modelToWorld]] [0,0,100]),[0,0,-1]];</code> |EXAMPLE2=
<code>[[setDefaultCamera]] [<nowiki/>[[ATLtoASL]] ([[player]] [[modelToWorld]] [0,0,100]),[0,0,-1]];</code>




| [[camCreate]], [[cameraOn]], [[cameraView]], [[cameraEffect]], [[cameraEffectEnableHUD]], [[switchCamera]], [[positionCameraToWorld]], [[cameraInterest]], [[setCameraInterest]], [[getEditorCamera]], [[mapCenterOnCamera]], [[preloadCamera]], [[restartEditorCamera]] |SEEALSO=
| [[camCreate]], [[cameraOn]], [[cameraView]], [[cameraEffect]], [[cameraEffectEnableHUD]], [[switchCamera]], [[positionCameraToWorld]], [[cameraInterest]], [[setCameraInterest]], [[getEditorCamera]], [[mapCenterOnCamera]], [[preloadCamera]], [[restartEditorCamera]]


}}
}}

Revision as of 11:12, 18 January 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

Notes