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

# MeshResource.Skeleton

A skeleton consists of a hierarchy of joints. Each joint defines a coordinate space.
Portions of a model may be thought of as having a position in a joint’s local space.

```
struct Skeleton
```

## Overview

Each joint in a skeleton has a name, which usually determines the joint’s parent. For
example, the legs of a human body might include these joints:

- `root`
- `root/hips_joint`
- `root/hips_joint/left_upLeg_joint`
- `root/hips_joint/left_upLeg_joint/left_leg_joint`
- `root/hips_joint/right_upLeg_joint`
- `root/hips_joint/right_upLeg_joint/right_leg_joint`
- etc.

Models with skinned animation are authored in a fixed pose (the “bind pose”). The position
of a vertex in a particular joint’s local space is a function of the vertex’s position in
the bind pose and an “inverse bind pose” matrix which transforms from the bind pose (model
space) to the joint’s local space.

When unanimated, the pose of a skinned model is defined by the rest pose of each joint. This
transform is relative to the joint’s parent. Usually, the rest pose of a model is the same
as its bind pose.

## Topics

### Structures

[`struct Joint`](/documentation/RealityKit/MeshResource/Skeleton/Joint)

A named joint in a [`MeshResource.Skeleton`](/documentation/RealityKit/MeshResource/Skeleton).

### Initializers

[`init?(id: String, jointNames: [String], inverseBindPoseMatrices: [simd_float4x4], restPoseTransforms: [Transform]?, parentIndices: [Int?]?)`](/documentation/RealityKit/MeshResource/Skeleton/init(id:jointNames:inverseBindPoseMatrices:restPoseTransforms:parentIndices:))

Creates a skeleton from arrays which define its joints. Returns `nil` if there was an
issue converting the parameters to a valid skeleton.

[`init(id: String, joints: [MeshResource.Skeleton.Joint])`](/documentation/RealityKit/MeshResource/Skeleton/init(id:joints:))

Creates a skeleton from an array of joints.

### Instance Properties

[`var id: String`](/documentation/RealityKit/MeshResource/Skeleton/id)

The unique identifier of this skeleton. This acts as a stable identity for this object.

[`var joints: [MeshResource.Skeleton.Joint]`](/documentation/RealityKit/MeshResource/Skeleton/joints)

The joints which define this skeleton’s hierarchy.

## Relationships

### Conforms To

[`Identifiable`](/documentation/Swift/Identifiable)

---

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)