![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <EngineTypes.h>
Public Types | |
| enum | EOptimizeMode : uint8 { TrailMode , LookAheadMode } |
Public Member Functions | |
| FAnimUpdateRateParameters () | |
| void | SetTrailMode (float DeltaTime, uint8 UpdateRateShift, int32 NewUpdateRate, int32 NewEvaluationRate, bool bNewInterpSkippedFrames) |
| void | SetLookAheadMode (float DeltaTime, uint8 UpdateRateShift, float LookAheadAmount) |
| float | GetInterpolationAlpha () const |
| float | GetRootMotionInterp () const |
| bool | DoEvaluationRateOptimizations () const |
| bool | ShouldSkipUpdate () const |
| bool | ShouldSkipEvaluation () const |
| bool | ShouldInterpolateSkippedFrames () const |
| float | GetTimeAdjustment () |
| FColor | GetUpdateRateDebugColor () const |
Container for Animation Update Rate parameters. They are shared for all components of an Actor, so they can be updated in sync.
|
inline |
Default constructor.
|
inline |
Return true if evaluation rate should be optimized at all
| float FAnimUpdateRateParameters::GetInterpolationAlpha | ( | ) | const |
Amount to interpolate bone transforms
| float FAnimUpdateRateParameters::GetRootMotionInterp | ( | ) | const |
Amount to interpoilate root motion
|
inline |
Called when we are ticking a pose to make sure we accumulate all needed time
|
inline |
Returns color to use for debug UI
| void FAnimUpdateRateParameters::SetLookAheadMode | ( | float | DeltaTime, |
| uint8 | UpdateRateShift, | ||
| float | LookAheadAmount | ||
| ) |
Set parameters and verify inputs for Lookahead mode, which handles Root Motion
| UpdateRateShift. Shift our update frames so that updates across all skinned components are staggered | |
| LookAheadAmount. Amount of time to look ahead and predict movement |
| void FAnimUpdateRateParameters::SetTrailMode | ( | float | DeltaTime, |
| uint8 | UpdateRateShift, | ||
| int32 | NewUpdateRate, | ||
| int32 | NewEvaluationRate, | ||
| bool | bNewInterpSkippedFrames | ||
| ) |
Set parameters and verify inputs for Trail Mode (original behaviour - skip frames, track skipped time and then catch up afterwards).
| UpdateRateShift. Shift our update frames so that updates across all skinned components are staggered | |
| NewUpdateRate. How often animation will be updated/ticked. 1 = every frame, 2 = every 2 frames, etc. | |
| NewEvaluationRate. How often animation will be evaluated. 1 = every frame, 2 = every 2 frames, etc. | |
| bNewInterpSkippedFrames. When skipping a frame, should it be interpolated or frozen? |
|
inline |
Getter for bInterpolateSkippedFrames
|
inline |
Getter for bSkipEvaluation
|
inline |
Getter for bSkipUpdate
| float FAnimUpdateRateParameters::AdditionalTime |
Total time of the last series of skipped updates
| int32 FAnimUpdateRateParameters::BaseNonRenderedUpdateRate |
Rate of animation evaluation when non rendered (off screen and dedicated servers). a value of 4 means evaluated 1 frame, then 3 frames skipped
Array of MaxDistanceFactor to use for AnimUpdateRate when mesh is visible (rendered). MaxDistanceFactor is size on screen, as used by LODs Example: BaseVisibleDistanceFactorThesholds.Add(0.4f) BaseVisibleDistanceFactorThesholds.Add(0.2f) means: 0 frame skip, MaxDistanceFactor > 0.4f 1 frame skip, MaxDistanceFactor > 0.2f 2 frame skip, MaxDistanceFactor > 0.0f
| uint8 FAnimUpdateRateParameters::bInterpolateSkippedFrames |
When skipping a frame, should it be interpolated or frozen?
| uint8 FAnimUpdateRateParameters::bShouldUseLodMap |
Whether or not to use the defined LOD/Frameskip map instead of separate distance factor thresholds
| uint8 FAnimUpdateRateParameters::bShouldUseMinLod |
If set, LOD/Frameskip map will be queried with mesh's MinLodModel instead of current LOD (PredictedLODLevel)
| uint8 FAnimUpdateRateParameters::bSkipEvaluation |
(This frame) animation evaluation should be skipped.
| uint8 FAnimUpdateRateParameters::bSkipUpdate |
(This frame) animation update should be skipped.
| int32 FAnimUpdateRateParameters::EvaluationRate |
How often animation will be evaluated. 1 = every frame, 2 = every 2 frames, etc. has to be a multiple of UpdateRate.
Map of LOD levels to frame skip amounts. if bShouldUseLodMap is set these values will be used for the frameskip amounts and the distance factor thresholds will be ignored. The flag and these values should be configured using the customization callback when parameters are created for a component.
Note that this is # of frames to skip, so if you have 20, that means every 21th frame, it will update, and evaluate.
| int32 FAnimUpdateRateParameters::MaxEvalRateForInterpolation |
Max Evaluation Rate allowed for interpolation to be enabled. Beyond, interpolation will be turned off.
| EOptimizeMode FAnimUpdateRateParameters::OptimizeMode |
Cache which Update Rate Optimization mode we are using
| EUpdateRateShiftBucket FAnimUpdateRateParameters::ShiftBucket |
The bucket to use when deciding which counter to use to calculate shift values
| int32 FAnimUpdateRateParameters::SkippedEvalFrames |
Number of evaluate frames that have been skipped in a row
| int32 FAnimUpdateRateParameters::SkippedUpdateFrames |
Number of update frames that have been skipped in a row
| float FAnimUpdateRateParameters::ThisTickDelta |
The delta time of the last tick
| float FAnimUpdateRateParameters::TickedPoseOffestTime |
Track time we have lost via skipping
| int32 FAnimUpdateRateParameters::UpdateRate |
How often animation will be updated/ticked. 1 = every frame, 2 = every 2 frames, etc.