Class BoneIKController
Constructors
constructor
-
new BoneIKController(
mesh: TransformNode,
bone: Bone,
options?: {
bendAxis?: Vector3;
maxAngle?: number;
poleAngle?: number;
poleTargetBone?: Bone;
poleTargetLocalOffset?: Vector3;
poleTargetMesh?: TransformNode;
slerpAmount?: number;
targetMesh?: TransformNode;
},
): BoneIKControllerCreates 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
- mesh: TransformNode
Properties
mesh
Gets or sets the TransformNode associated with the controller Name kept as mesh for back compatibility
pole Angle
Gets or sets the pole angle
pole Target Bone
Gets or sets the bone used as pole
pole Target Local Offset
Gets or sets the pole target local offset
pole Target Mesh
Gets or sets the mesh used as pole
pole Target Position
Gets or sets the pole target position
slerp Amount
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)
target Mesh
Gets or sets the target TransformNode Name kept as mesh for back compatibility
target Position
Gets or sets the target position
Class used to apply inverse kinematics to bones
See
https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons#boneikcontroller