Vector3D: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (example formatting)
(Fix description)
Line 8: Line 8:
Represents a 3-dimensional vector in space.
Represents a 3-dimensional vector in space.


Each value can range from -1 to +1.
A '''[[vectorNormalized|normalised]]''' vector means that each value is within range -1..+1.




Line 14: Line 14:
  _vdir = [[player]] [[weaponDirection]] ([[primaryWeapon]] [[player]]);  
  _vdir = [[player]] [[weaponDirection]] ([[primaryWeapon]] [[player]]);  
  _adir= _vdir [[select|#]] 0 [[atan2]] _vdir [[select|#]] 1;  
  _adir= _vdir [[select|#]] 0 [[atan2]] _vdir [[select|#]] 1;  


[[Category: Arrays]]
[[Category: Arrays]]

Revision as of 18:03, 26 June 2020

Format:

[x, y, z]


Description:

Represents a 3-dimensional vector in space.

A normalised vector means that each value is within range -1..+1.


The return array can be processed-converted into degrees as follows:

_vdir = player weaponDirection (primaryWeapon player); 
_adir= _vdir # 0 atan2 _vdir # 1;