BIS_fnc_distance2D

From Bohemia Interactive Community
Revision as of 16:45, 19 November 2017 by Lou Montana (talk | contribs) (populated the page)
Jump to navigation Jump to search


Hover & click on the images for description

Description

Description:
Arma 2 version of distance2D.
Use distance2D instead if available as Arma 3's BIS_fnc_distance2D uses distance2D internally anyway
/************************************************************
	Distance 2D

Parameters: [object or position 1, object or position 2]

Returns the distance between the two objects or positions
"as the crow flies" (ignoring elevation)
Example: [player, getpos dude] call BIS_fnc_distance2D
************************************************************/

//return squared distance between _pos1 and _pos2
(Placeholder description extracted from the function header by BIS_fnc_exportFunctionsToWiki)
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[param1, param2] call BIS_fnc_distance2D
Parameters:
param1: Object or Array in format Position or Position2D
param2: Object or Array in format Position or Position2D
Return Value:
Number - Distance in meters or 1e10 if distance cannot be calculated

Examples

Example 1:
[player, rescueHelicopter] call BIS_fnc_distance2D

Additional Information

See also:
distance2D

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

Notes

Bottom Section