EntityLinearFactor()

Syntax

EntityLinearFactor(#Entity, x, y, z)
Description
Changes the linear factor for the #Entity. When moved, the entity linear velocity is multiplied by the linear factor to get the final velocity. This is very useful to constraint an entity move on one or several axis. By default, the linear factor is 1 for all axis meaning no impact on the velocity. The entity needs a physic body to support linear velocity constraint.

Parameters

#Entity The entity to use.
x The 'x' linear factor value. If set to the 0, the entity won't be able to move on the 'x' axis anymore.
y The 'y' linear factor vector. If set to the 0, the entity won't be able to move on the 'y' axis anymore.
z The 'z' linear factor vector. If set to the 0, the entity won't be able to move on the 'z' axis anymore.

Return value

None.

Supported OS

All

<- EntityID() - Entity Index - EntityLookAt() ->