---
title: "automatchBiped(_:sourceTransform:to:targetTransform:jointOffsets:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/retargetingconfiguration/automatchbiped(_:sourcetransform:to:targettransform:jointoffsets:)"
---

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

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

## Declaration

```swift
@MainActor static func automatchBiped(_ 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

Return Value A configured retargeting instance ready for animation processing.

## Discussion

Discussion This overload allows you to specify custom transforms for the root bones of both skeletons, which is useful when the characters are positioned or oriented differently in their bind poses. The function applies the transforms during the automatic matching process to establish proper correspondences. The automatic matching algorithm has the same joint requirements and behavior as automatchBiped(_:to:jointOffsets:). Example do {     // Source character facing +Z, target facing +X     let sourceTransform = Transform(rotation: simd_quatf(angle: 0, axis: simd_float3(0, 1, 0)))     let targetTransform = Transform(rotation: simd_quatf(angle: .pi/2, axis: simd_float3(0, 1, 0)))

let config = try RetargetingConfiguration.automatchBiped(         sourceSkeleton,         sourceTransform: sourceTransform,         to: targetSkeleton,         targetTransform: targetTransform     ) } catch {     print("Failed to create retargeting configuration: \(error.localizedDescription)") } note: 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.

## See Also

### Creating a configuration

- [automatchBiped(_:to:jointOffsets:)](realitykit/retargetingconfiguration/automatchbiped(_:to:jointoffsets:).md)
- [automatchQuadruped(_:sourceTransform:to:targetTransform:jointOffsets:)](realitykit/retargetingconfiguration/automatchquadruped(_:sourcetransform:to:targettransform:jointoffsets:).md)
