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

19.2.12 lerpconst

v = physics.Vect:lerpconst(vec, d)

Parameter

Type

Description

self

in physics.Vect

The input vector

vec

in physics.Vect

The other vector

d

in number

The distance from self to vec to interpolate a new vector

v

out physics.Vect

 

Returns a vector interpolated from self towards vec with length d.

Note

May not behave as expected for d larger than 1.0 or less than 0.

Introduced in platform.apiLevel = '2.0'