<!--
{
  "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/AnimationEvents/RootMotionDidUpdate",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation15AnimationEventsO19RootMotionDidUpdateV"
  },
  "title" : "AnimationEvents.RootMotionDidUpdate"
}
-->

# AnimationEvents.RootMotionDidUpdate

The event raised each frame when a new root motion delta is produced for an entity.

```
struct RootMotionDidUpdate
```

## Overview

Root motion is locomotion that’s authored into an animation itself — for example, a
run cycle whose root joint advances forward — rather than driven by code. Each
frame’s contribution is reported as a [`rootMotionTransform`](/documentation/RealityKit/AnimationEvents/RootMotionDidUpdate/rootMotionTransform) delta, which the
system applies to the entity’s transform automatically. The event fires after
animation evaluation but before the resulting skeletal pose is applied to the mesh.

Subscribe to this event when you need to take over root motion application —
for example, to project the delta onto a navigation surface or to reject motion
on collision. By default, subscribing through `scene.subscribe(to:on:)` suppresses
the automatic application; the subscriber is then fully responsible for applying
or discarding the delta.

### Take over root motion application

```swift
scene.subscribe(to: AnimationEvents.RootMotionDidUpdate.self, on: entity) { event in
    entity.transform = event.rootMotionTransform * entity.transform
}
```

### Observe root motion without taking over

To observe the delta while leaving automatic application in place, set
[`suppressesAutomaticApplication`](/documentation/RealityKit/AnimationEvents/RootMotionDidUpdate/suppressesAutomaticApplication) to `false` inside the handler:

```swift
scene.subscribe(to: AnimationEvents.RootMotionDidUpdate.self, on: entity) { event in
    event.suppressesAutomaticApplication = false
    print("Delta: \(event.rootMotionTransform)")
}
```

## Topics

### Accessing root motion

[`let rootMotionTransform: Transform`](/documentation/RealityKit/AnimationEvents/RootMotionDidUpdate/rootMotionTransform)

The change in position and orientation since the previous frame.

[`var suppressesAutomaticApplication: Bool`](/documentation/RealityKit/AnimationEvents/RootMotionDidUpdate/suppressesAutomaticApplication)

A Boolean value that controls whether subscribing to the event suppresses
automatic application of the root motion delta.

### Instance Properties

[`let deltaTime: TimeInterval`](/documentation/RealityKit/AnimationEvents/RootMotionDidUpdate/deltaTime)

The elapsed time since the last update, in seconds.

[`let entity: Entity`](/documentation/RealityKit/AnimationEvents/RootMotionDidUpdate/entity)

The entity the root motion delta was produced for.

## Relationships

### Conforms To

[`Event`](/documentation/RealityKit/Event)

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

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

---

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)