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

# AnimationStateProtocol

The protocol representing the current animation state of an action animation.

```
protocol AnimationStateProtocol
```

## Overview

The animation state allows actions to animate a target value using RealityKit’s animation engine.

Animating values with the animation engine allows for cross-fading and additive compositing
with other RealityKit animations targeting the same value.

Access the animation state structure from the event structure returned
to `.updated` event handlers. Define a valid bind target and matching animation type
to make the state structure available and non nil.

> Note: Custom actions don’t support animating ``doc://com.apple.RealityKit/documentation/RealityKit/BlendShapeWeights``.

## Topics

### Associated Types

[`associatedtype ValueType : AnimatableData`](/documentation/RealityKit/AnimationStateProtocol/ValueType)

### Instance Properties

[`var defaultSource: Self.ValueType?`](/documentation/RealityKit/AnimationStateProtocol/defaultSource)

The previous blend stage value.

[`var defaultTarget: Self.ValueType?`](/documentation/RealityKit/AnimationStateProtocol/defaultTarget)

The default unanimated value of the target.

[`var deltaTime: TimeInterval`](/documentation/RealityKit/AnimationStateProtocol/deltaTime)

The time that has elapsed since the most recent evaluation,
or 0 if animation is paused.

[`var evaluationTime: TimeInterval`](/documentation/RealityKit/AnimationStateProtocol/evaluationTime)

The time at which the animation result should be evaluated.

[`var normalizedTime: TimeInterval`](/documentation/RealityKit/AnimationStateProtocol/normalizedTime)

The normalized time ranges from 0 to 1, and is the time at which the animation
result should be evaluated.

### Instance Methods

[`func storeAnimatedValue<ValueType>(ValueType) -> Bool`](/documentation/RealityKit/AnimationStateProtocol/storeAnimatedValue(_:))

Stores the action’s animated value, which the animation manager uses
to produce a final animated result.
Returns true on success, otherwise false.

## Relationships

### Conforming Types

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

---

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)