R3d.Body:setAngularLockAxisFactor

From GiderosMobile
Revision as of 13:42, 18 December 2025 by MoKaLux (talk | contribs) (Created page with "'''Available since:''' Gideros 2020.2<br/> '''Class:''' R3d.Body<br/> === Description === Restricts the angular motion of a rigid body along the world-space x, y and z ax...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2020.2
Class: R3d.Body

Description

Restricts the angular motion of a rigid body along the world-space x, y and z axes.

r3d.Body:setAngularLockAxisFactor(lfx,lfy,lfz)

For instance, you can disable the rotation of a rigid body along the world-space Y axis by setting the lock factor to zero for this axis.

Parameters

lfx: (number) the new angular lock factor on the x axis, default = 1 no lock
lfy: (number) the new angular lock factor on the y axis, default = 1 no lock
lfz: (number) the new angular lock factor on the z axis, default = 1 no lock

Example

-- Disable rotation along the Y axis
player1.body:setAngularLockAxisFactor(1, 0, 1)