Difference between revisions of "BIS fnc vectorFromXToY"

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page filling)
m (Text replacement - " <nowiki>[</nowiki>" to " [<nowiki/>")
 
Line 24: Line 24:
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|x1= <code>_resultVector = <nowiki>[</nowiki>[[getPosASL]] [[vehicle]] [[player]], [[getPosASL]] airTarget] [[call]] [[BIS_fnc_vectorFromXToY]];</code> |Example 1=
+
|x1= <code>_resultVector = [<nowiki/>[[getPosASL]] [[vehicle]] [[player]], [[getPosASL]] airTarget] [[call]] [[BIS_fnc_vectorFromXToY]];</code> |Example 1=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  

Latest revision as of 13:16, 19 March 2020

Introduced with Arma 2 version 1.001.00
Hover & click on the images for descriptions

Description

Description:
Returns a unit vector that 'points' from vector1 to vector2. This is a very useful function as it can be used with the velocity command to move an object from one position to another (i.e vector1 to vector2).
ensure both positions are found using getPosASL.

Syntax

Syntax:
[vector1, vector2] call BIS_fnc_vectorFromXToY
Parameters:
vector1: Array
vector2: Array
Return Value:
Array

Examples

Example 1:
_resultVector = [getPosASL vehicle player, getPosASL airTarget] call BIS_fnc_vectorFromXToY;

Additional Information

Execution:
call
See also:
velocitysetVelocityvectorAdd

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.

Notes

Bottom Section