camSetDir: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Some wiki formatting - re adding camSetDir number syntax)
m (Text replacement - "<dl class="command_description"> <dd class="notedate">" to "<dl class="command_description"> <dt></dt> <dd class="notedate">")
Line 75: Line 75:
<!-- CONTINUE Notes -->
<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dt></dt>
<dd class="notedate">Posted on May 9, 2016 - 19:47 (UTC)</dd>
<dd class="notedate">Posted on May 9, 2016 - 19:47 (UTC)</dd>
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>

Revision as of 14:28, 5 April 2021

Hover & click on the images for description

Description

Description:
Sets the orientation of the given camera in the direction of the given vector. Needs camCommit.
Groups:
Camera Control

Syntax

Syntax:
camera camSetDir direction
Parameters:
camera: Object - object of type "camera"
direction:
  • Number (before Arma 3 logo black.png0.50) - camera azimuth
  • Array in format [x,y,z] (since Arma 3 logo black.png0.50) - direction of camera. Must be a valid vector.
Return Value:
Nothing

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:
directionsetDircamSetTarget

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
Posted on May 9, 2016 - 19:47 (UTC)
Killzone Kid
cameraEffect "INTERNAL" works better than "EXTERNAL" with this command.