One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

IKComponent.Constraint

class · iOS 18.0+ · SDK 27.1

class Constraint

The update stage object that lets you read and update the current settings of a single constraint in an IK solver. The settings this object exposes are the runtime editable values of the solver constraint. Initial values are set in ``IKRig/Constraint``.

Members (12)

get · iOS 18.0+

lookAtTargetPosition

TypeScript
get lookAtTargetPosition(): SDKHandle
Swift declaration
var lookAtTargetPosition: SIMD3<Float> { get set }

The point demand which the look-at constraint uses to generate a new orientation demand. The position is in model space. The computed demand overrides the rotation part of ``target``.

set · iOS 18.0+

lookAtTargetPosition

TypeScript
set lookAtTargetPosition(value: SDKHandle)
Swift declaration
var lookAtTargetPosition: SIMD3<Float> { get set }

The point demand which the look-at constraint uses to generate a new orientation demand. The position is in model space. The computed demand overrides the rotation part of ``target``.

get · iOS 18.0+

animationOverrideWeight

TypeScript
get animationOverrideWeight(): { "position": number; "rotation": number }
Swift declaration
var animationOverrideWeight: (position: Float, rotation: Float) { get set }

The blending weights between the FK demand and the your target per demand type. Each demand uses either the value you set using ``target`` and ``lookAtTargetPosition``, or computes one from the FK demand pose. These weights control the blending between the two. The values are in the closed range `[0, 1]`, where a weight value of `0` means the constraint demands are computed from the FK demand, and a weight value of `1` means that ``target`` is used. All values in-between represent linear blend of the two. Default values are 0.

set · iOS 18.0+

animationOverrideWeight

TypeScript
set animationOverrideWeight(value: { "position": number; "rotation": number })
Swift declaration
var animationOverrideWeight: (position: Float, rotation: Float) { get set }

The blending weights between the FK demand and the your target per demand type. Each demand uses either the value you set using ``target`` and ``lookAtTargetPosition``, or computes one from the FK demand pose. These weights control the blending between the two. The values are in the closed range `[0, 1]`, where a weight value of `0` means the constraint demands are computed from the FK demand, and a weight value of `1` means that ``target`` is used. All values in-between represent linear blend of the two. Default values are 0.

get · iOS 18.0+

id

TypeScript
get id(): IKRig_Constraint_ID
Swift declaration
final let id: IKComponent.Constraint.ID

ID of the constraint, that is unique within the solver instance.

get · iOS 18.0+

name

TypeScript
get name(): string
Swift declaration
var name: String { get }

The name of the constraint as defined in the rig.

get · iOS 18.0+

offset

TypeScript
get offset(): Transform
Swift declaration
var offset: Transform { get set }

The offset applied on top of the target transform before the solve.

set · iOS 18.0+

offset

TypeScript
set offset(value: Transform)
Swift declaration
var offset: Transform { get set }

The offset applied on top of the target transform before the solve.

get · iOS 18.0+

target

TypeScript
get target(): Transform
Swift declaration
var target: Transform { get set }

The packed targets for the positional and orientational demands in model space.

set · iOS 18.0+

target

TypeScript
set target(value: Transform)
Swift declaration
var target: Transform { get set }

The packed targets for the positional and orientational demands in model space.

get · iOS 18.0+

demands

TypeScript
get demands(): IKComponent_Constraint_DemandOptions
Swift declaration
var demands: IKComponent.Constraint.DemandOptions { get }

The set of the active demands of the constraint.

get · iOS 18.0+

jointID

TypeScript
get jointID(): IKRig_Joint_ID
Swift declaration
var jointID: IKComponent.Joint.ID { get }

The identifier of the constrained rig joint.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →