Skip to content

Documentation / scene / IKAngleConstraint

Class: IKAngleConstraint ​

Defined in: libs/scene/src/animation/ik/ik_angle_constraint.ts:17

Angle constraint for IK joints.

Limits the angle between the bone from parent to this joint and the bone from this joint to child.

Remarks ​

This is useful for joints like elbows and knees that have limited range of motion.

Extends ​

Constructors ​

Constructor ​

new IKAngleConstraint(jointIndex, minAngle, maxAngle): IKAngleConstraint

Defined in: libs/scene/src/animation/ik/ik_angle_constraint.ts:30

Create an angle constraint.

Parameters ​

jointIndex ​

number

Index of the joint in the chain

minAngle ​

number

Minimum angle in degrees (0 = straight)

maxAngle ​

number

Maximum angle in degrees (180 = fully bent)

Returns ​

IKAngleConstraint

Overrides ​

IKConstraint.constructor

Properties ​

_jointIndex ​

protected _jointIndex: number

Defined in: libs/scene/src/animation/ik/ik_constraint.ts:13

The joint index this constraint applies to

Inherited from ​

IKConstraint._jointIndex

Accessors ​

minAngle ​

Get Signature ​

get minAngle(): number

Defined in: libs/scene/src/animation/ik/ik_angle_constraint.ts:43

Get the minimum angle in degrees.

Returns ​

number

Set Signature ​

set minAngle(value): void

Defined in: libs/scene/src/animation/ik/ik_angle_constraint.ts:47

Parameters ​
value ​

number

Returns ​

void


maxAngle ​

Get Signature ​

get maxAngle(): number

Defined in: libs/scene/src/animation/ik/ik_angle_constraint.ts:54

Get the maximum angle in degrees.

Returns ​

number

Set Signature ​

set maxAngle(value): void

Defined in: libs/scene/src/animation/ik/ik_angle_constraint.ts:58

Parameters ​
value ​

number

Returns ​

void


jointIndex ​

Get Signature ​

get jointIndex(): number

Defined in: libs/scene/src/animation/ik/ik_constraint.ts:27

Get the joint index this constraint applies to.

Returns ​

number

Inherited from ​

IKConstraint.jointIndex

Methods ​

apply() ​

apply(joints): void

Defined in: libs/scene/src/animation/ik/ik_angle_constraint.ts:65

Apply the angle constraint to limit joint bending.

Parameters ​

joints ​

IKJoint[]

Returns ​

void

Overrides ​

IKConstraint.apply

Released under the MIT License.