---
title: "init(named:rootJoint:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/ikrig/init(named:rootjoint:)"
---

# init(named:rootJoint:)

Creates an IK rig from a joint hierarchy.

## Declaration

```swift
init(named name: String, rootJoint: SkeletonResource.Joint) throws
```

## Parameters

- `name`: The name to associate with the rig.
- `rootJoint`: The root joint of the skeleton hierarchy to derive the rig from.

## Discussion

Discussion note: If the joint hierarchy contains invalid data.
