TrickyAnimationComponents
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.
At the moment, the package is compatible only with Unreal Engine 4.
- Download package file;
- Unzip the package to the Plugins folder in engine folder, e.g. C:\Program Files\Epic Games\UE_4.27\Engine\Plugins;
- 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:
- RotationAnimationComponent;
- FloatingAnimationComponent;
- EaseAnimationComponent;
- TimelineAnimationComponent;
- SplineAnimationComponent;
RotationAnimationComponent
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;
OscillationAnimationComponent
A scene component which create oscillation animation for location, rotation and scale.
- IsEnable - 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;
- SetIsFloating - toggles floating animation along XYZ axis;
An actor component which moves the actor towards a target using interpolation functions.
- IsEnabled - toggles the easing animation;
- FollowActor - switches between using location from a target actor or a specific world location.
- TargetActor - an actor which world location will be used as a target location;
- SpecificLocation - a world location which will be used as a target location;
- LocationOffset - location offset relative to the target location;
- EasingFunction - a type of the function which will be used for moving an owner;
- Alpha - determines the speed of the movement;
- Exponent - blend exponent, used only with EaseIn, EaseOut, EaseInOut easing functions. The higher the steeper the graph.
- SubSteps - the number of substeps for the Step easing function;
TimelineAnimationComponent
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 the SetAnimatedComponents 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;
- 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;
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;
- StopAtPoints - toggles if the owner will stop at the spline points during the animation;
- WaitAtStart - toggles if the owner will "stop" at the start point;
- UseCustomStops - enables custom stops adjustments;
- CustomStops - map with point indexes and wait time;
- 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;