Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / IKComponent

Class: IKComponent ​

Defined in: components/IK.ts:70

Inverse kinematics for a humanoid model: after the animation plays, each chain bends an arm or leg so its hand/foot reaches a target entity — the second hand on a rifle's grip, a hand on a door handle, a foot on a step. The elbow/knee keeps the animation's bend unless a pole entity says otherwise. Bones are found by humanoid name, so any rig the editor recognises works (Mixamo, auto-rigs, Unreal, VRM).

A chain with clips runs only while one of those clips plays, fading in and out as the clip changes: a left hand on a rifle's grip in the rifle clips, free in the rest. Without an Animation component no clip is playing, so such a chain stays off.

The IKSystem runs it right after the AnimationSystem; objects attached to the moved bones follow.

Extends ​

Constructors ​

Constructor ​

ts
new IKComponent(options?): IKComponent;

Defined in: components/IK.ts:76

Parameters ​

ParameterType
options?IKOptions

Returns ​

IKComponent

Overrides ​

Component.constructor

Properties ​

PropertyTypeDescriptionDefined in
chainsIKChain[]The limbs that reach.components/IK.ts:72
enabledbooleanTurn every chain off at once.components/IK.ts:74