Skip to content

@relu-interactives/spatial-ecs


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

Type Alias: IKChain ​

ts
type IKChain = {
  limb: IKLimb;
  target: EntityId | null;
  pole: EntityId | null;
  weight: number;
  matchRotation: boolean;
  enabled: boolean;
  clips: string[] | null;
  fade: number | null;
};

Defined in: components/IK.ts:8

One limb reaching for an entity.

Properties ​

PropertyTypeDescriptionDefined in
limbIKLimbThe hand or foot that reaches.components/IK.ts:10
targetEntityId | nullEntity whose world position the hand/foot reaches (a weapon's grip, a door handle, a step).components/IK.ts:12
poleEntityId | nullEntity the elbow/knee bends toward; null keeps the animation's own bend.components/IK.ts:14
weightnumber0 = the animation, 1 = the target; in between blends.components/IK.ts:16
matchRotationbooleanAlso turn the hand/foot to the target's rotation.components/IK.ts:18
enabledbooleanWhether this chain runs.components/IK.ts:20
clipsstring[] | nullOnly while one of these clips plays (null = whatever plays).components/IK.ts:22
fadenumber | nullSeconds a chain with clips takes to fade in or out when the clip changes; null follows the Animation component's cross-fade, so the IK and the clip change together.components/IK.ts:28