You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Physics Library > dist

19.2.5 dist

dist = physics.Vect:dist(vec)

Parameter

Type

Description

self

in physics.Vect

The input vector

vec

in physics.Vect

A vector used to find the distance from self

dist

out number

The distance from self to vec

Returns the distance between self and vec.

Introduced in platform.apiLevel = '2.0'