Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.00

Description

Description:Returns the distance in meters between two Object, Position-2, or (in VBS2 1.24+) Location.

Syntax

Syntax:var1 distance var2
Parameters:
Return Value:Number - Distance in meters.

Examples

Examples:_meters=player distance _object_meters=player distance [1,2,3]_meters=[1,2,3] distance player_meters=[1,2,3] distance [4,5,6]

Additional Information

See also: fn_vbs_vectorDistance, fn_vbs_distance2D
Multiplayer: 
Problems: 

Notes







Posted on Mar 10, 2010 - 12:00
Rommel
This returns the map distance, not the vector distance, [0,0,0] distance [0,0,1] can be >1 or <1, not exactly 1; unlike the vector math.