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

# JointTransforms

A set of animatable transform values for joints that collectively represent
a single skeletal pose.

```
struct JointTransforms
```

## Overview

This structure provides a template that informs an animation on how to animate a
character. The resulting movement bases on
the *from* ([`fromValue`](/documentation/RealityKit/FromToByAnimation/fromValue-6msd))
, *to* ([`toValue`](/documentation/RealityKit/FromToByAnimation/toValue-813jk))
, or *by* values ([`byValue`](/documentation/RealityKit/FromToByAnimation/byValue-3bp3q)) you
supply for a [`FromToByAnimation`](/documentation/RealityKit/FromToByAnimation). The animation determines which joints take
on the movement through its [`jointNames`](/documentation/RealityKit/FromToByAnimation/jointNames) property.

## Animate an Entity’s Skeleton

The following code moves the joints of a 3D asset by specifying the joint,
`joint1`, beginning, and ending values.

```swift
// Define the joint's pose at the start of the animation.
let fromTransforms: [Transform] = [Transform(scale: SIMD3<Float>(1, 2, 3), rotation: simd_quatf(ix: 5.0, iy: 6.0, iz: 7.0, r: 8.0), translation: SIMD3<Float>(10, 20, 30))]
let fromPose = JointTransforms(fromTransforms)

// Define the joint's pose at the end of the animation.
let toTransforms: [Transform] = [Transform(scale: SIMD3<Float>(10, 20, 30), rotation:
simd_quatf(ix: 50.0, iy: 60.0, iz: 70.0, r: 80.0), translation:
SIMD3<Float>(100, 200, 300)) ]
let toPose = JointTransforms(toTransforms)

// Indicate that the animation applies to the joint named 'joint1'.
let jointNames = ["joint1"]

// Configure the animation specifics.
var fromToBy = FromToByAnimation<JointTransforms>()
fromToBy.name = "anim"
fromToBy.blendLayer = 100
fromToBy.duration = 10.0
fromToBy.fillMode = .forwards
fromToBy.jointNames = jointNames
fromToBy.fromValue = fromPose
fromToBy.toValue = toPose
fromToBy.bindTarget = .transform

// Generate a resource from the animation.
let animationResource = fromToBy.create()
```

To run the animation on an entity and animate the joints, call
`playAnimation(_:transitionDuration:startsPaused:)`. Optionally, you can
control the animation’s playback by storing the returned controller object.

```swift
// Play the animation on an entity.
let entity = AnchorEntity(...)
let controller = entity.playAnimation(animationResource)

// Optionally control playback using the returned controller.
controller.pause()
```

## Topics

### Creating joint transforms

[`init()`](/documentation/RealityKit/JointTransforms/init())

Initializes a collection of animatable transforms for a single skeletal
pose.

[`init(_:)`](/documentation/RealityKit/JointTransforms/init(_:))

Initializes a collection of transforms of a specific type for a single
skeletal pose.

[`init(arrayLiteral:)`](/documentation/RealityKit/JointTransforms/init(arrayLiteral:))

Initializes a collection of animatable transforms using the argument
elements for a single skeletal pose.

### Identifying joint transforms

[`JointTransforms.Index`](/documentation/RealityKit/JointTransforms/Index)

A position of an individual joint transform in the collection.

### Inspecting joint transform details

[`startIndex`](/documentation/RealityKit/JointTransforms/startIndex)

An index to the first joint transform in the collection.

[`endIndex`](/documentation/RealityKit/JointTransforms/endIndex)

An index to the last joint transform in the collection.

### Accessing joint transforms

[`subscript(_:)`](/documentation/RealityKit/JointTransforms/subscript(_:))

Accesses a single joint transform in the collection at the given index.

[`index(after:)`](/documentation/RealityKit/JointTransforms/index(after:))

Returns the position in the sequence of the joint that follows the given
position.

[`index(before:)`](/documentation/RealityKit/JointTransforms/index(before:))

Returns the position in the sequence of the joint that preceeds the
given position.



---

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)