vectorDir: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "[[Image:" to "[[File:") |
Lou Montana (talk | contribs) m (Text replacement - "killzone_kid" to "Killzone_Kid") |
||
Line 50: | Line 50: | ||
<dt></dt> | <dt></dt> | ||
<dd class="notedate">Posted on 2019-02-02 - 01:03 (UTC)</dd> | <dd class="notedate">Posted on 2019-02-02 - 01:03 (UTC)</dd> | ||
<dt class="note">[[User: | <dt class="note">[[User:Killzone_Kid|Killzone_Kid]]</dt> | ||
<dd class="note"> vectorDir 2D: | <dd class="note"> vectorDir 2D: | ||
<sqf>[sin _azimuth, cos _azimuth, 0]</sqf> | <sqf>[sin _azimuth, cos _azimuth, 0]</sqf> |
Latest revision as of 17:52, 18 February 2024
Description
- Description:
-
Returns an object's direction vector in world space.
For an object facing one of the cardinal directions on perfectly flat ground (parallel to the XY-plane of the world space), vectorDir returns simple values:
- [0, 1, 0] if the object is facing directly north
- [1, 0, 0] if the object is facing directly east
- [0, -1, 0] if the object is facing directly south
- [-1, 0, 0] if the object is facing directly west
- Groups:
- Math - Vectors
Syntax
Examples
- Example 1:
Additional Information
- See also:
- vectorModelToWorld vectorDirVisual vectorSide vectorSideVisual vectorUp setVectorDir setVectorUp setVectorDirAndUp vectorDiff vectorAdd vectorMultiply vectorCrossProduct vectorDistance vectorMagnitudeSqr vectorDistanceSqr vectorCos vectorMagnitude vectorDotProduct vectorNormalized vectorFromTo BIS_fnc_transformVectorDirAndUp
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 2019-02-02 - 01:03 (UTC)
- Killzone_Kid
- vectorDir 2D: vectorDir 3D:
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint: Elite version 1.00
- Operation Flashpoint: Elite: New 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: Math - Vectors