<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/RetargetingConfiguration",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation24RetargetingConfigurationC"
  },
  "title" : "RetargetingConfiguration"
}
-->

# RetargetingConfiguration

A configuration for retargeting skeletal animations between different skeletons.

```
class RetargetingConfiguration
```

## Overview

[`RetargetingConfiguration`](/documentation/RealityKit/RetargetingConfiguration) enables the transfer of animations from one skeleton
to another, automatically mapping joints and adapting poses to accommodate different
skeletal structures. This is particularly useful for applying animations across different
character models or creatures.

## Usage

Create configurations using the static factory methods for common skeleton types:

- [`automatchBiped(_:to:jointOffsets:)`](/documentation/RealityKit/RetargetingConfiguration/automatchBiped(_:to:jointOffsets:)) for humanoid/bipedal characters
- [`automatchQuadruped(_:sourceTransform:to:targetTransform:jointOffsets:)`](/documentation/RealityKit/RetargetingConfiguration/automatchQuadruped(_:sourceTransform:to:targetTransform:jointOffsets:)) for four-legged creatures

## Example

```swift
do {
    // Basic biped retargeting
    let config = try RetargetingConfiguration.automatchBiped(
        sourceCharacterSkeleton,
        to: targetCharacterSkeleton
    )

    // With joint offset adjustments applied during configuration creation
    let jointOffsets: [String: simd_quatf] = [
        "LeftShoulder": simd_quatf(angle: 0.1, axis: simd_float3(0, 1, 0)),
        "RightShoulder": simd_quatf(angle: -0.1, axis: simd_float3(0, 1, 0))
    ]
    let configWithOffsets = try RetargetingConfiguration.automatchBiped(
        sourceCharacterSkeleton,
        to: targetCharacterSkeleton,
        jointOffsets: jointOffsets
    )
} catch {
    print("Failed to create retargeting configuration: \(error.localizedDescription)")
}
```

## Performance Considerations

- Configuration creation is computationally expensive and should be cached when possible.
- The automatic matching algorithm analyzes skeleton hierarchies to establish joint correspondences.
- Joint offsets are baked into the configuration during creation, not applied at runtime.

## Topics

### Creating a configuration

[`static func automatchBiped(SkeletonResource, sourceTransform: Transform, to: SkeletonResource, targetTransform: Transform, jointOffsets: [String : simd_quatf]) throws -> RetargetingConfiguration`](/documentation/RealityKit/RetargetingConfiguration/automatchBiped(_:sourceTransform:to:targetTransform:jointOffsets:))

Creates a retargeting configuration for bipedal characters with custom root transforms.

[`static func automatchBiped(SkeletonResource, to: SkeletonResource, jointOffsets: [String : simd_quatf]) throws -> RetargetingConfiguration`](/documentation/RealityKit/RetargetingConfiguration/automatchBiped(_:to:jointOffsets:))

Creates a retargeting configuration for bipedal characters using automatic joint matching.

[`static func automatchQuadruped(SkeletonResource, sourceTransform: Transform, to: SkeletonResource, targetTransform: Transform, jointOffsets: [String : simd_quatf]) throws -> RetargetingConfiguration`](/documentation/RealityKit/RetargetingConfiguration/automatchQuadruped(_:sourceTransform:to:targetTransform:jointOffsets:))

Creates a retargeting configuration for quadrupedal characters using automatic joint matching.

### Accessing the skeletons

[`var sourceSkeleton: SkeletonResource`](/documentation/RealityKit/RetargetingConfiguration/sourceSkeleton)

The skeleton the source animation targets.

[`var targetSkeleton: SkeletonResource`](/documentation/RealityKit/RetargetingConfiguration/targetSkeleton)

The skeleton the retargeting animates.



---

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)