API

Class BoneIKController

Class used to apply inverse kinematics to bones

Index
  • Creates a new BoneIKController

    Parameters

    • mesh: TransformNode

      defines the TransformNode to control

    • bone: Bone

      defines the bone to control. The bone needs to have a parent bone. It also needs to have a length greater than 0 or a children we can use to infer its length.

    • Optionaloptions: {
          bendAxis?: Vector3;
          maxAngle?: number;
          poleAngle?: number;
          poleTargetBone?: Bone;
          poleTargetLocalOffset?: Vector3;
          poleTargetMesh?: TransformNode;
          slerpAmount?: number;
          targetMesh?: TransformNode;
      }

      defines options to set up the controller

    Returns BoneIKController

Gets or sets the TransformNode associated with the controller Name kept as mesh for back compatibility

poleAngle: number = 0

Gets or sets the pole angle

poleTargetBone: Nullable<Bone>

Gets or sets the bone used as pole

poleTargetLocalOffset: Vector3 = ...

Gets or sets the pole target local offset

poleTargetMesh: TransformNode

Gets or sets the mesh used as pole

poleTargetPosition: Vector3 = ...

Gets or sets the pole target position

slerpAmount: number = 1

The amount to slerp (spherical linear interpolation) to the target. Set this to a value between 0 and 1 (a value of 1 disables slerp)

targetMesh: TransformNode

Gets or sets the target TransformNode Name kept as mesh for back compatibility

targetPosition: Vector3 = ...

Gets or sets the target position