<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/IKRig",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation5IKRigV"
  },
  "title" : "IKRig"
}
-->

# IKRig

A full body inverse kinematics rig definition for a single skeleton.

```
struct IKRig
```

## Overview

Describes the skeleton, its tuning, and the active constraints for the solver instance.

### Balance of demands’ weights in a full body solver

The full body solver calculates the final pose by balancing the various demands based on their assigned weights.
This process ensures that each demand, ranging from forward kinematics (FK) demands to constraints on joint
movement, affects the pose proportionally to its importance.

The solver reads the FK demands from the [`SkeletalPosesComponent`](/documentation/RealityKit/SkeletalPosesComponent). As such these demands are either
a playing animation for the model, or just a static pose.

All demands have an element specific weight, and some have a global rig weight. The rig weights influence
the overall rig, while element weights adjust individual aspects of the model.

The table below provides detailed mappings of these weights to their respective demand types.

|Demand type           |Rig weight                                                                      |Element weight                                                                                     |
|----------------------|--------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
|FK demands            |``doc://com.apple.RealityKit/documentation/RealityKit/IKRig/globalFkWeight``    |``doc://com.apple.RealityKit/documentation/RealityKit/IKRig/Joint/fkWeightPerAxis``                |
|Joint rotation limits |``doc://com.apple.RealityKit/documentation/RealityKit/IKRig/globalLimitsWeight``|``doc://com.apple.RealityKit/documentation/RealityKit/IKRig/Joint/LimitsDefinition/weight``        |
|Constraint position   |Not applicable                                                                  |``doc://com.apple.RealityKit/documentation/RealityKit/IKRig/Constraint/IKPositionDemand/weight``   |
|Constraint orientation|Not applicable                                                                  |``doc://com.apple.RealityKit/documentation/RealityKit/IKRig/Constraint/IKOrientationDemand/weight``|

> Note: While constraints do not have rig weight, they have blending weight between automatic and custom
> targets. See ``doc://com.apple.RealityKit/documentation/RealityKit/IKComponent/Constraint/animationOverrideWeight`` for more information.

## Topics

### Creating a rig

[`init(named: String, rootJoint: SkeletonResource.Joint) throws`](/documentation/RealityKit/IKRig/init(named:rootJoint:))

Creates an IK rig from a joint hierarchy.

### Structures

[`struct Constraint`](/documentation/RealityKit/IKRig/Constraint)

A definition of a rig constraint.

[`struct ConstraintsCollection`](/documentation/RealityKit/IKRig/ConstraintsCollection)

Ordered dictionary-like container.

[`struct Joint`](/documentation/RealityKit/IKRig/Joint)

A definition of a rig joint and its IK solver settings.

[`struct JointCollection`](/documentation/RealityKit/IKRig/JointCollection)

Ordered dictionary-like container with a fixed size.

### Initializers

[`init(for: MeshResource.Skeleton) throws`](/documentation/RealityKit/IKRig/init(for:))

Creates an inverse kinematics rig definition for the provided skeleton.

### Instance Properties

[`var constraints: IKRig.ConstraintsCollection`](/documentation/RealityKit/IKRig/constraints)

A collection of all of the rig’s constraint settings.

[`var globalFkWeight: Float`](/documentation/RealityKit/IKRig/globalFkWeight)

The solver global weight for the forward kinematics demands.

[`var globalLimitsWeight: Float`](/documentation/RealityKit/IKRig/globalLimitsWeight)

The solver global weight for the joint rotation limits.

[`var joints: IKRig.JointCollection`](/documentation/RealityKit/IKRig/joints)

A collection of all of the rig’s joint settings.

[`var maxIterations: Int`](/documentation/RealityKit/IKRig/maxIterations)

The maximum number of iterations the solver is allowed to do per frame.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)