setDefaultCamera: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <nowiki>[</nowiki>" to " [<nowiki/>")
m (Text replacement - "ATLtoASL" to "ATLToASL")
 
(44 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.10


|1.10|Game version=
|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=
|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)
____________________________________________________________________________________________


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


|p1= position: [[PositionASL]] - position of the camera |PARAMETER1=
|p1= position: [[Array]] format [[Position#PositionASL|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=
|r1= [[Nothing]]
____________________________________________________________________________________________


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


|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=
<sqf>setDefaultCamera [ATLToASL (player modelToWorld [0, 0, 100]), [0, 0, -1]];</sqf>
 
____________________________________________________________________________________________
 
| [[camCreate]], [[cameraOn]], [[cameraView]], [[cameraEffect]], [[cameraEffectEnableHUD]], [[switchCamera]], [[positionCameraToWorld]], [[cameraInterest]], [[setCameraInterest]], [[getEditorCamera]], [[mapCenterOnCamera]], [[preloadCamera]], [[restartEditorCamera]] |SEEALSO=


|seealso= [[camCreate]] [[cameraOn]] [[cameraView]] [[cameraEffect]] [[cameraEffectEnableHUD]] [[switchCamera]] [[positionCameraToWorld]] [[cameraInterest]] [[setCameraInterest]] [[getEditorCamera]] [[mapCenterOnCamera]] [[preloadCamera]] [[restartEditorCamera]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Camera Control|setDefaultCamera]]

Latest revision as of 19:26, 29 July 2022

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: Array format 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:
camCreate cameraOn cameraView cameraEffect cameraEffectEnableHUD switchCamera positionCameraToWorld cameraInterest setCameraInterest getEditorCamera mapCenterOnCamera preloadCamera restartEditorCamera

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