Luduvo Contents
Theme
On this page

SwingTwistJointDesc

the axes and angle limits to build a swing-twist joint from

Fields

9 members

Anchor: vector

anchor position of the joint in local space

Friction: number?

joint rotational friction coefficient

NormalCone: number

maximum swing angle along the normal axis in radians

PlaneAxis: vector

plane axis orthogonal to the twist axis

PlaneCone: number

maximum swing angle along the plane axis in radians

RestAxis: vector?

rest direction for swing limits

TwistAxis: vector

primary twist axis of the joint

TwistMax: number

maximum twist angle limit in radians

TwistMin: number

minimum twist angle limit in radians

Building a Ragdoll Joint

Lifecycle: Server

The anchor and the axes are given in the local space of the instance, and every limit is an angle in radians.

Luau
local arm = handles.RagdollArmarm:SetSwingTwistJoint({	Anchor = Vector3.new(0, 1, 0),	TwistAxis = Vector3.new(1, 0, 0),	PlaneAxis = Vector3.new(0, 1, 0),	PlaneCone = math.rad(45),	NormalCone = math.rad(30),	TwistMin = math.rad(-20),	TwistMax = math.rad(20),	Friction = 0.1})