---
title: AnimationPlaybackController
framework: realitykit
role: symbol
role_heading: Class
path: realitykit/animationplaybackcontroller
---

# AnimationPlaybackController

A controller that manages animation playback.

## Declaration

```swift
@MainActor @preconcurrency class AnimationPlaybackController
```

## Overview

Overview This class controls the playback of an entity animation by providing its pause, resume, or stop functions. The animation starts immediately after you call playAnimation(_:transitionDuration:startsPaused:), or Entity/move(to:relativeTo:duration:timingFunction:)-905k, which both return an instance of this class. A controller invalidates after its associated animation completes or stops. To play another animation, perform an action that generates another controller. While an animation plays, you can receive notification of particular playback states by subscribing to an event. For more information, see AnimationEvents.

## Topics

### Inspecting and controlling playback

- [pause()](realitykit/animationplaybackcontroller/pause().md)
- [resume()](realitykit/animationplaybackcontroller/resume().md)
- [stop()](realitykit/animationplaybackcontroller/stop().md)
- [isPlaying](realitykit/animationplaybackcontroller/isplaying.md)
- [isStopped](realitykit/animationplaybackcontroller/isstopped.md)
- [isValid](realitykit/animationplaybackcontroller/isvalid.md)
- [blendFactor](realitykit/animationplaybackcontroller/blendfactor.md)

### Managing completion

- [isComplete](realitykit/animationplaybackcontroller/iscomplete.md)
- [isPaused](realitykit/animationplaybackcontroller/ispaused.md)

### Accessing the associated entity

- [entity](realitykit/animationplaybackcontroller/entity.md)

### Timing animation playback

- [duration](realitykit/animationplaybackcontroller/duration.md)
- [speed](realitykit/animationplaybackcontroller/speed.md)
- [clock](realitykit/animationplaybackcontroller/clock.md)
- [time](realitykit/animationplaybackcontroller/time.md)

### Operators

- [==(_:_:)](realitykit/animationplaybackcontroller/==(_:_:).md)

### Instance Methods

- [hash(into:)](realitykit/animationplaybackcontroller/hash(into:).md)
- [stop(blendOutDuration:)](realitykit/animationplaybackcontroller/stop(blendoutduration:).md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [Observable](observation/observable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Animation playback

- [Automatically animating RealityKit entities](realitykit/automatically-animating-realitykit-entities.md)
- [AnimationResource](realitykit/animationresource.md)
- [AnimationLibraryComponent](realitykit/animationlibrarycomponent.md)
- [AnimationLibraryComponent.AnimationCollection](realitykit/animationlibrarycomponent/animationcollection.md)
- [AnimationEvents](realitykit/animationevents.md)
- [AnimationRepeatMode](realitykit/animationrepeatmode.md)
