<!--
{
  "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/automatchQuadruped(_:sourceTransform:to:targetTransform:jointOffsets:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation24RetargetingConfigurationC18automatchQuadruped_15sourceTransform2to06targetH012jointOffsetsAcA16SkeletonResourceC_AA0H0VAjLSDySSSo10simd_quatfaGtKFZ"
  },
  "title" : "automatchQuadruped(_:sourceTransform:to:targetTransform:jointOffsets:)"
}
-->

# automatchQuadruped(_:sourceTransform:to:targetTransform:jointOffsets:)

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

```
static func automatchQuadruped(_ sourceSkeleton: SkeletonResource, sourceTransform: Transform = .identity, to targetSkeleton: SkeletonResource, targetTransform: Transform = .identity, jointOffsets: [String : simd_quatf] = [:]) throws -> RetargetingConfiguration
```

## Parameters

`sourceSkeleton`

The skeleton of the animation to retarget.

`sourceTransform`

Transform applied to the source skeleton’s root during matching (defaults to identity).

`targetSkeleton`

The skeleton that will receive the re-targeted animation.

`targetTransform`

Transform applied to the target skeleton’s root during matching (defaults to identity).

`jointOffsets`

Optional quaternion offsets applied to specific joints during configuration creation.
Keys must match joint names in the target skeleton. The function applies offsets on top of
the automatically detected joint correspondences and bakes them into the configuration.

## Return Value

A configured retargeting instance ready for animation processing.

## Discussion> Throws: An error if configuration creation fails. All errors provide descriptive messages via their
> `localizedDescription` property. Common failures include:
> 
> - A joint offset was specified for a joint name that doesn’t exist in the target skeleton.
> - The algorithm could not identify required joints in one or both skeletons.
> - Joint identification or rig generation failed.

---

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)