IkConstraintData

ConstraintDataspine.IkConstraintData (Class)

Stores the setup pose for an {@link IkConstraint}.

See IK constraints in the Spine User Guide.

Instance Members


spine
target: BoneData

spine
bendDirection: Int

spine
compress: Bool

spine
stretch: Bool

spine
uniform: Bool

spine
mix: Float

spine
softness: Float

The bones that are constrained by this IK constraint.

Returns
spine.support.utils.Array<BoneData>

spine
getTarget(): BoneData

The bone that is the IK target.

Returns
BoneData

spine
setTarget(target: BoneData): Void
Name Type
target BoneData

spine
getMix(): Float

A percentage (0-1) that controls the mix between the constrained and unconstrained rotation.

For two bone IK: if the parent bone has local nonuniform scale, the child bone's local Y translation is set to 0. | Returns | |---------| | [Float](/api-docs/clay-native/Float/) |


spine
setMix(mix: Float): Void
Name Type
mix Float

spine
getSoftness(): Float

For two bone IK, the target bone's distance from the maximum reach of the bones where rotation begins to slow. The bones will not straighten completely until the target is this far out of range.

Returns
Float

spine
setSoftness(softness: Float): Void
Name Type
softness Float

spine
getBendDirection(): Int

For two bone IK, controls the bend direction of the IK bones, either 1 or -1.

Returns
Int

spine
setBendDirection(bendDirection: Int): Void
Name Type
bendDirection Int

spine
getCompress(): Bool

For one bone IK, when true and the target is too close, the bone is scaled to reach it.

Returns
Bool

spine
setCompress(compress: Bool): Void
Name Type
compress Bool

spine
getStretch(): Bool

When true and the target is out of range, the parent bone is scaled to reach it.

For two bone IK: 1) the child bone's local Y translation is set to 0, 2) stretch is not applied if {@link #getSoftness()} is > 0, and 3) if the parent bone has local nonuniform scale, stretch is not applied. | Returns | |---------| | [Bool](/api-docs/clay-native/Bool/) |


spine
setStretch(stretch: Bool): Void
Name Type
stretch Bool

spine
getUniform(): Bool

When true and {@link #getCompress()} or {@link #getStretch()} is used, the bone is scaled on both the X and Y axes.

Returns
Bool

spine
setUniform(uniform: Bool): Void
Name Type
uniform Bool

spine
new(name: String): Void
Name Type
name String