A small plugin with a collection of actor and scene components which can help with the animation of actors and their parts.
The plugin can be used in both C++ and Blueprint projects.
- Download package file;
- Install the plugin either in your project or for all projects in engine:
- Unzip the package into Plugins folder of your project, e.g.
D:\UnrealProjects\MyProject\Plugins
; - Unzip the package to the Plugins folder in engine folder, e.g.
C:\Program Files\Epic Games\UE_5.0\Engine\Plugins
;
- Unzip the package into Plugins folder of your project, e.g.
- Restart the project;
In this case the plugin can be used for any blueprint project.
- Create the Plugins folder in the project directory;
- Create the TrickyAnimationComponents folder in the Plugins folder;
- Download the plugin source code into that folder;
- Rebuild the project;
The plugin contains:
- EaseAnimationComponent;
- EasingAnimationSceneComponent;
- FollowAnimationComponent;
- OscillationAnimationComponent;
- RotationAnimationComponent;
- SplineAnimationComponent;
- TimelineAnimationComponent;
An actor component which can animate owners location, rotation and scale using easing functions.
AutoPlay
- toggles if the animation will start on begin play or not;bPlayFromEnd
- if true, PlayFromEnd function will be called on begin play, else PlayFromStart;AnimationBehavior
- Determines behavior of the animation:Normal
plays once;Loop
loops normal behavior;AdditiveLoop
increment target values by their initial value each cycle;PingPong
animates from initial values to target and back;
EaseFunction
- ease function which will be used for the animation;TargetLocation
- target world location of the animation;TargetRotation
- target world rotation of the animation;TargetScale
- target world scale of the animation;Duration
- animation duration;IsPlaying
- shows if the animation is playing;
PlayFromStart
- starts the animation from initial location/rotation/scale;PlayFromEnd
- start the animation from target location/rotation/scale;Stop
- stops the animation;
OnAnimationFinished
- called when the animation cycle finished;
A scene component which can animate its location, rotation and scale using easing functions.
AutoPlay
- toggles if the animation will start on begin play or not;bPlayFromEnd
- if true, PlayFromEnd function will be called on begin play, else PlayFromStart;AnimationBehavior
- Determines behavior of the animation:Normal
plays once;Loop
loops normal behavior;AdditiveLoop
increment target values by their initial value each cycle;PingPong
animates from initial values to target and back;
EaseFunction
- ease function which will be used for the animation;TargetLocation
- target relative location of the animation;TargetRotation
- target relative rotation of the animation;TargetScale
- target relative scale of the animation;Duration
- animation duration;IsPlaying
- shows if the animation is playing;
PlayFromStart
- starts the animation from initial location/rotation/scale;PlayFromEnd
- start the animation from target location/rotation/scale;Stop
- stops the animation;
OnAnimationFinished
- called when the animation cycle finished;
A component which interpolates an owning actor location towards a target location/actor.
FollowActor
- toggles if the component will interpolate position towards a target actor or a specific location;TargetActor
- an actor which world location will be used as a target location;Location
- the world location which will be used as a target location;TargetLocationOffsetz
- location offset relative to the target location;Speed
- determines the speed of interpolation;IsFollowing
- shows if the component follows the target location;
StartFollowing
- start interpolation;StopFollowing
- stops interpolation;
A scene component which create oscillation animation for location, rotation and scale.
IsEnabled
- toggles all the animations;- For location, rotation, scale:
AnimateX
- toggle animation along X axis;AnimateY
- toggle animation along Y axis;AnimateZ
- toggle animation along Z axis;Amplitude
- determines the animation amplitude for each axis;Frequency
- determines the animation frequency for each axis;
SetIsEnabled
- toggles oscillation animation;
A scene component which rotates along the chosen axis.
RotateX
- toggle rotation along the X axis;RotateY
- toggle rotation along the Y axis;RotateZ
- toggle rotation along the Z axis;RotationSpeed
- determines the rotation speed along each axis;
SetIsRotating
- toggles rotation along XYZ axis;
An actor component which moves an actor along a spline component using a timeline component.
- Add component to an actor;
- Create or use the existing curve float object for the
AnimationCurve
variable; - Place the actor in the world;
- Choose an actor with a spline component as
TargetActor
; - Setup animation behavior in blueprints if needed;
AnimationMode
- a mode which determines how the animation will work;SplineActor
- an actor which contains a spline component;AnimationCurve
- a float curve object used by the timeline component for the animation;- It's better to use a curve with length equal 1.f;
AnimationTime
- length of the animation;AnimationSpeed
- used for calculation of the animation time;- Great for splines with many points and when the animation time between them must be constant;
StartPointIndex
- the point index from which the animation will be started;IsReversed
- determines if the order of points will be reversed or not;StopMode
- determines the rules how the owner should stop at the points;WaitAtAnimationStart
- toggles if the owner will "stop" at the start point;UseCustomStops
- enables custom stops adjustments;WaitTimer
- how long the owner will wait at the point;SplineOffset
- the offset along the spline;LocationOffset
- location offset relative to the current location along the spline;InheritRotation
- determines if the rotation along spline must be applied to the owner;InheritScale
- determines if the scale along spline must be applied to the owner;
Start
- starts the animation;Stop
- stops the animation at the next spline point;AnimateTo
- animates to the chosen point. Works only in the manual mode;Pause
- pauses the animation;Resume
- resumes the animation;IsPlaying
- returns true if the animation is playing;
An actor component which animates transforms of the chosen scene components of an actor using a timeline.
- Add the component to the chosen actor;
- Fill the
AnimatedComponents
array using theSetAnimatedComponents
function in the construction script;- Only for scene components;
- Omits nullptr entries;
- Fill the
TransformOffsets
array by hand;- The number of offsets must be equal to the number of animated components;
- Create or use the existing curve float object for the
AnimationCurve
variable; - Setup animation behavior in blueprints;
InitialState
- the initial state of the animation on begin play;AnimationTime
- the length of the animation;AnimationCurve
- a float curve object used by the timeline component for the animation. It's better to use a curve with length equal 1.f;AnimateWholeActor
- if true, the whole actor will be animated. Doesn't require call ofSetAnimatedComponents
;TransformOffsets
- an array with transform offsets for each scene component in the AnimatedComponents array. The number of offsets must be equal to the number of animated components;
Start
- starts the animation;Reverse
- reverse the current animation. Works only if current state is a transition state;Pause
- pauses the animation;Resume
- resumes the animation;SetAnimatedComponents
- fills the Animated components array with the chosen scene components. It'll omit nullptr entries;CanPlayAnimation
- returns if the animation can be played or not;GetAnimationProgress
- returns progress of the animation;