One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

IKRig.Constraint

struct · iOS 18.0+ · SDK 27.1

struct Constraint

A definition of a rig constraint. Each constraint can have its position and orientation demands enabled individually.

Members (16)

static · iOS 18.0+

lookAtAbsolute

TypeScript
static lookAtAbsolute(name: string, jointName: string, targetAxis: SDKHandle, orientationWeight?: SDKHandle): IKRig_Constraint
Swift declaration
static func lookAtAbsolute(named name: String, on jointName: String, lookingAlong targetAxis: SIMD3<Float>, orientationWeight: SIMD3<Float> = [1, 1, 1]) -> IKRig.Constraint

Creates a constraint with only an orientational demand in absolute look-at mode. - Parameters: - name: The rig unique name of the constraint - jointName: The name of the joint to constrain. - targetAxis: The axis from the constrained joint to look-at target position in the model space of the entity. - orientationWeight: The weight of the orientation demand. - Seealso: `IKOrientationDemand.Mode.absoluteLookAt`

static · iOS 18.0+

lookAtAdditive

TypeScript
static lookAtAdditive(name: string, jointName: string, targetAxis: SDKHandle, orientationWeight?: SDKHandle): IKRig_Constraint
Swift declaration
static func lookAtAdditive(named name: String, on jointName: String, lookingAlong targetAxis: SIMD3<Float>, orientationWeight: SIMD3<Float> = [1, 1, 1]) -> IKRig.Constraint

Creates a constraint with only an orientational demand in additive look-at mode. - Parameters: - name: The rig unique name of the constraint - jointName: The name of the joint to constrain. - targetAxis: The axis from the constrained joint to look-at target position in the local space of the joint. - orientationWeight: The weight of the orientation demand. - Seealso: `IKOrientationDemand.Mode.additiveLookAt`

get · iOS 18.0+

positionDemand

TypeScript
get positionDemand(): (IKRig_Constraint_IKPositionDemand) | null
Swift declaration
var positionDemand: IKRig.Constraint.IKPositionDemand?

The settings of the positional demand.

set · iOS 18.0+

positionDemand

TypeScript
set positionDemand(value: (IKRig_Constraint_IKPositionDemand) | null)
Swift declaration
var positionDemand: IKRig.Constraint.IKPositionDemand?

The settings of the positional demand.

get · iOS 18.0+

orientationDemand

TypeScript
get orientationDemand(): (IKRig_Constraint_IKOrientationDemand) | null
Swift declaration
var orientationDemand: IKRig.Constraint.IKOrientationDemand?

The settings of the orientational demand.

set · iOS 18.0+

orientationDemand

TypeScript
set orientationDemand(value: (IKRig_Constraint_IKOrientationDemand) | null)
Swift declaration
var orientationDemand: IKRig.Constraint.IKOrientationDemand?

The settings of the orientational demand.

get · iOS 18.0+

id

TypeScript
get id(): IKRig_Constraint_ID
Swift declaration
var id: IKRig.Constraint.ID { get }

The identifier of the constraint.

get · iOS 18.0+

name

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

The name of the constraint. - Important: Each constraint needs a unique name within a rig.

set · iOS 18.0+

name

TypeScript
set name(value: string)
Swift declaration
var name: String

The name of the constraint. - Important: Each constraint needs a unique name within a rig.

static · iOS 18.0+

point

TypeScript
static point(name: string, jointName: string, positionWeight?: SDKHandle): IKRig_Constraint
Swift declaration
static func point(named name: String, on jointName: String, positionWeight: SIMD3<Float> = [1, 1, 1]) -> IKRig.Constraint

Creates a constraint with only a positional demand. - Parameters: - name: The rig unique name of the constraint - jointName: The name of the joint to constrain. - positionWeight: The weight of the position demand.

get · iOS 18.0+

offset

TypeScript
get offset(): Transform
Swift declaration
var offset: Transform

A constraint target offset. The constraints adds this offset on top of its target. Useful for cases where the target comes from a binding.

set · iOS 18.0+

offset

TypeScript
set offset(value: Transform)
Swift declaration
var offset: Transform

A constraint target offset. The constraints adds this offset on top of its target. Useful for cases where the target comes from a binding.

static · iOS 18.0+

orient

TypeScript
static orient(name: string, jointName: string, orientationWeight?: SDKHandle): IKRig_Constraint
Swift declaration
static func orient(named name: String, on jointName: String, orientationWeight: SIMD3<Float> = [1, 1, 1]) -> IKRig.Constraint

Creates a constraint with only an orientation demand. - Parameters: - name: The rig unique name of the constraint - jointName: The name of the joint to constrain. - orientationWeight: The weight of the orientation demand.

static · iOS 18.0+

parent

TypeScript
static parent(name: string, jointName: string, positionWeight?: SDKHandle, orientationWeight?: SDKHandle): IKRig_Constraint
Swift declaration
static func parent(named name: String, on jointName: String, positionWeight: SIMD3<Float> = [1, 1, 1], orientationWeight: SIMD3<Float> = [1, 1, 1]) -> IKRig.Constraint

Creates a constraint with both a positional and an orientational demands. - Parameters: - name: The rig unique name of the constraint - jointName: The name of the joint to constrain. - positionWeight: The weight of the position demand. - orientationWeight: The weight of the orientation demand.

get · iOS 18.0+

jointName

TypeScript
get jointName(): string
Swift declaration
var jointName: String

The name of the constrained joint.

set · iOS 18.0+

jointName

TypeScript
set jointName(value: string)
Swift declaration
var jointName: String

The name of the constrained joint.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →