UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CommonAnimationTypes.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Curves/CurveFloat.h"
7#include "CommonAnimationTypes.generated.h"
8
12UENUM()
14{
15 // Linear easing (no change to the value)
16 Linear,
17 // Easing using a sinus function
19 // Cubic version of the value (only in)
20 Cubic,
21 // Quadratic version of the value (in and out)
23 // Cubic version of the value (in and out)
25 // Easing using a cubic hermite function
27 // Quartic version of the value (in and out)
29 // Quintic version of the value (in and out)
31 // Circular easing (only in)
33 // Circular easing (only out)
35 // Circular easing (in and out)
37 // Exponential easing (only in)
38 ExpIn,
39 // Exponential easing (only out)
40 ExpOut,
41 // Exponential easing (in and out)
43 // Custom - based on an optional Curve
45};
46
47// A rotational component. This is used for retargeting, for example.
48UENUM()
50{
51 // Using the X component of the Euler rotation
52 EulerX,
53 // Using the Y component of the Euler rotation
54 EulerY,
55 // Using the Z component of the Euler rotation
56 EulerZ,
57 // Using the angle of the quaternion
59 // Using the angle of the swing quaternion
61 // Using the angle of the twist quaternion
63};
64
70USTRUCT(BlueprintType)
72{
74
75public:
76
79 : bEnabled(bInEnabled)
80 , Source(FTransform::Identity)
81 , Target(FTransform::Identity)
82 , RotationComponent(ERotationComponent::SwingAngle)
83 , TwistAxis(FVector(1.f, 0.f, 0.f))
84 , bUseAbsoluteAngle(false)
85 , SourceMinimum(0.f)
86 , SourceMaximum(45.f)
87 , TargetMinimum(0.f)
88 , TargetMaximum(45.f)
89 , EasingType(EEasingFuncType::Linear)
91 , bFlipEasing(false)
92 , EasingWeight(1.f)
93 , bClamp(false)
94 {
95 }
96
97 // Set to true this enables retargeting
98 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo")
99 bool bEnabled;
100
101 // The source transform of the frame of reference. The rotation is made relative to this space
102 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo")
104
105 // The target transform to project the rotation. In most cases this is the same as Source
106 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo")
108
109 // The rotation component to perform retargeting with
110 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo")
111 ERotationComponent RotationComponent;
112
113 // In case the rotation component is SwingAngle or TwistAngle this vector is used as the twist axis
114 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo")
115 FVector TwistAxis;
116
117 // If set to true the angle will be always positive, thus resulting in mirrored rotation both ways
118 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo")
119 bool bUseAbsoluteAngle;
120
121 // The minimum value of the source angle in degrees
122 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo", meta = (UIMin = "-90.0", UIMax = "90.0"))
123 float SourceMinimum;
124
125 // The maximum value of the source angle in degrees
126 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo", meta = (UIMin = "-90.0", UIMax = "90.0"))
127 float SourceMaximum;
128
129 // The minimum value of the target angle in degrees (can be the same as SourceMinimum)
130 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo", meta = (UIMin = "-90.0", UIMax = "90.0"))
131 float TargetMinimum;
132
133 // The target value of the target angle in degrees (can be the same as SourceMaximum)
134 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo", meta = (UIMin = "-90.0", UIMax = "90.0"))
135 float TargetMaximum;
136
137 // The easing to use - pick linear if you don't want to apply any easing
138 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo")
139 EEasingFuncType EasingType;
140
142 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo")
144
145 // If set to true the interpolation value for the easing will be flipped (1.0 - Value)
146 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo")
147 bool bFlipEasing;
148
149 // The amount of easing to apply (value should be 0.0 to 1.0)
150 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo", meta = (UIMin = "0.0", UIMax = "1.0"))
151 float EasingWeight;
152
153 // If set to true the value for the easing will be clamped between 0.0 and 1.0
154 UPROPERTY(EditAnywhere, Category = "FRotationRetargetingInfo")
155 bool bClamp;
156};
ERotationComponent
Definition CommonAnimationTypes.h:50
EEasingFuncType
Definition CommonAnimationTypes.h:14
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
const bool
Definition NetworkReplayStreaming.h:178
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
uint8_t uint8
Definition binka_ue_file_header.h:8
@ false
Definition radaudio_common.h:23
Definition CommonAnimationTypes.h:72
FRotationRetargetingInfo(bool bInEnabled=true)
Definition CommonAnimationTypes.h:78
Definition CurveFloat.h:13