camSetDir: Difference between revisions
BrettMayson (talk | contribs) mNo edit summary |
BrettMayson (talk | contribs) mNo edit summary |
||
| Line 28: | Line 28: | ||
|eff= local | |eff= local | ||
|descr= Sets the orientation of the given camera in the direction of the given vector. Needs [[camCommit]]. | |descr= Sets the orientation of the given camera in the direction of the given vector. Needs [[camCommit]]. Since {{GVI|arma3|0.50}}, only the second syntax with a [[Vector3D]] is available. | ||
|s1= camera [[camSetDir]] azimuth | |s1= camera [[camSetDir]] azimuth | ||
| Line 35: | Line 35: | ||
|p12= azimuth: [[Number]] - camera azimuth | |p12= azimuth: [[Number]] - camera azimuth | ||
|x1= Since {{arma3}}: | |x1= Since {{arma3}}: | ||
Revision as of 05:21, 2 January 2026
Description
- Description:
- Sets the orientation of the given camera in the direction of the given vector. Needs camCommit. Since
0.50, only the second syntax with a Vector3D is available. - Groups:
- Camera Control
Syntax
- Syntax:
- camera camSetDir azimuth
- Return Value:
- Return value needed
Examples
- Example 1:
- Since Arma 3:
private _pos1 = player modelToWorld [0, 5, 5]; private _pos2 = player modelToWorld [0, 50, 50]; private _cam = "camera" camCreate _pos1; _cam cameraEffect ["INTERNAL", "BACK"]; _cam camSetPos _pos2; _cam camSetDir (_pos2 vectorFromTo _pos1); _cam camCommit 5; waitUntil { camCommitted _cam }; _cam camSetPos _pos1; _cam camCommit 5;
- Example 2:
- Before Arma 3:
private _pos1 = player modelToWorld [0, 5, 5]; private _pos2 = player modelToWorld [0, 50, 50]; private _cam = "camera" camCreate _pos1; _cam cameraEffect ["INTERNAL", "BACK"]; _cam camSetPos _pos2; _cam camSetDir 180; _cam camCommit 5; waitUntil { camCommitted _cam }; _cam camSetPos _pos1; _cam camCommit 5;
Additional Information
- See also:
- direction setDir camSetTarget getCameraViewDirection
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note
- Posted on May 09, 2016 - 19:47 (UTC)
- cameraEffect "INTERNAL" works better than "EXTERNAL" with this command.
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Camera Control
- Scripting Commands: Local Effect