Skip to content

Commit 2ade5c1

Browse files
committed
Update README.md
1 parent 7deb623 commit 2ade5c1

1 file changed

Lines changed: 123 additions & 57 deletions

File tree

README.md

Lines changed: 123 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The plugin can be used in both C++ and Blueprint projects.
1010

1111
**At the moment, the package is compatible only with Unreal Engine 4.**
1212

13-
1. Download [**package file**](https://github.com/TrickyFatCat/TrickyAnimationComponents/releases/tag/v1.1);
13+
1. Download [**package file**](https://github.com/TrickyFatCat/TrickyAnimationComponents/releases/);
1414
2. Unzip the package to the Plugins folder in engine folder, e.g. `C:\Program Files\Epic Games\UE_4.27\Engine\Plugins`;
1515
3. Restart the project;
1616

@@ -27,34 +27,99 @@ In this case the plugin can be used for any blueprint project.
2727

2828
The plugin contains:
2929

30-
1. RotationAnimationComponent;
31-
2. FloatingAnimationComponent;
32-
3. EaseAnimationComponent;
33-
4. TimelineAnimationComponent;
34-
5. SplineAnimationComponent;
30+
1. EaseAnimationComponent;
31+
2. EasingAnimationSceneComponent;
32+
3. FollowAnimationComponent;
33+
4. OscillationAnimationComponent;
34+
5. RotationAnimationComponent;
35+
6. SplineAnimationComponent;
36+
7. TimelineAnimationComponent;
3537

36-
### RotationAnimationComponent
38+
### EaseAnimationComponent
3739

38-
A scene component which rotates along the chosen axis.
40+
An actor component which can animate owners location, rotation and scale using easing functions.
3941

4042
#### Variables
4143

42-
1. `RotateX` - toggle rotation along the X axis;
43-
2. `RotateY` - toggle rotation along the Y axis;
44-
3. `RotateZ` - toggle rotation along the Z axis;
45-
4. `RotationSpeed` - determines the rotation speed along each axis;
44+
1. `AutoPlay` - toggles if the animation will start on begin play or not;
45+
2. `bPlayFromEnd` - if true, PlayFromEnd function will be called on begin play, else PlayFromStart;
46+
3. `AnimationBehavior` - Determines behavior of the animation:
47+
- `Normal` plays once;
48+
- `Loop` loops normal behavior;
49+
- `AdditiveLoop` increment target values by their initial value each cycle;
50+
- `PingPong` animates from initial values to target and back;
51+
4. `EaseFunction` - ease function which will be used for the animation;
52+
5. `TargetLocation` - target world location of the animation;
53+
6. `TargetRotation` - target world rotation of the animation;
54+
7. `TargetScale` - target world scale of the animation;
55+
8. `Duration` - animation duration;
56+
9. `IsPlaying` - shows if the animation is playing;
4657

4758
#### Functions
4859

49-
1. `SetIsRotating` - toggles rotation along XYZ axis;
60+
1. `PlayFromStart` - starts the animation from initial location/rotation/scale;
61+
2. `PlayFromEnd` - start the animation from target location/rotation/scale;
62+
3. `Stop` - stops the animation;
63+
64+
#### Delegates
65+
66+
1. `OnAnimationFinished` - called when the animation cycle finished;
67+
68+
### EasingAnimationComponent
69+
70+
A scene component which can animate its location, rotation and scale using easing functions.
71+
72+
#### Variables
73+
74+
1. `AutoPlay` - toggles if the animation will start on begin play or not;
75+
2. `bPlayFromEnd` - if true, PlayFromEnd function will be called on begin play, else PlayFromStart;
76+
3. `AnimationBehavior` - Determines behavior of the animation:
77+
- `Normal` plays once;
78+
- `Loop` loops normal behavior;
79+
- `AdditiveLoop` increment target values by their initial value each cycle;
80+
- `PingPong` animates from initial values to target and back;
81+
4. `EaseFunction` - ease function which will be used for the animation;
82+
5. `TargetLocation` - target relative location of the animation;
83+
6. `TargetRotation` - target relative rotation of the animation;
84+
7. `TargetScale` - target relative scale of the animation;
85+
8. `Duration` - animation duration;
86+
9. `IsPlaying` - shows if the animation is playing;
87+
88+
#### Functions
89+
90+
1. `PlayFromStart` - starts the animation from initial location/rotation/scale;
91+
2. `PlayFromEnd` - start the animation from target location/rotation/scale;
92+
3. `Stop` - stops the animation;
93+
94+
#### Delegates
95+
96+
1. `OnAnimationFinished` - called when the animation cycle finished;
97+
98+
### FollowAnimationComponent
99+
100+
A component which interpolates an owning actor location towards a target location/actor.
101+
102+
#### Variables
103+
104+
1. `FollowActor` - toggles if the component will interpolate position towards a target actor or a specific location;
105+
2. `TargetActor` - an actor which world location will be used as a target location;
106+
3. `Location` - the world location which will be used as a target location;
107+
4. `TargetLocationOffsetz` - location offset relative to the target location;
108+
5. `Speed` - determines the speed of interpolation;
109+
6. `IsFollowing` - shows if the component follows the target location;
110+
111+
#### Functions
112+
113+
1. `StartFollowing` - start interpolation;
114+
2. `StopFollowing` - stops interpolation;
50115

51116
### OscillationAnimationComponent
52117

53118
A scene component which create oscillation animation for location, rotation and scale.
54119

55120
#### Variables
56121

57-
1. `IsEnable` - toggles all the animations;
122+
1. `IsEnabled` - toggles all the animations;
58123
2. For location, rotation, scale:
59124
1. `AnimateX` - toggle animation along X axis;
60125
2. `AnimateY` - toggle animation along Y axis;
@@ -64,56 +129,22 @@ A scene component which create oscillation animation for location, rotation and
64129

65130
#### Functions
66131

67-
1. `SetIsFloating` - toggles floating animation along XYZ axis;
68-
69-
### EaseAnimationComponent
70-
71-
An actor component which moves the actor towards a target using interpolation functions.
72-
73-
#### Variables
132+
1. `SetIsEnabled` - toggles oscillation animation;
74133

75-
1. `IsEnabled` - toggles the easing animation;
76-
2. `FollowActor` - switches between using location from a target actor or a specific world location.
77-
3. `TargetActor` - an actor which world location will be used as a target location;
78-
4. `SpecificLocation` - a world location which will be used as a target location;
79-
5. `LocationOffset` - location offset relative to the target location;
80-
6. `EasingFunction` - a type of the function which will be used for moving an owner;
81-
7. `Alpha` - determines the speed of the movement;
82-
8. `Exponent` - blend exponent, used only with EaseIn, EaseOut, EaseInOut easing functions. The higher the steeper the graph.
83-
9. `SubSteps` - the number of substeps for the Step easing function;
84-
85-
### TimelineAnimationComponent
86-
87-
An actor component which animates transforms of the chosen scene components of an actor using a timeline.
88-
89-
#### Setup
134+
### RotationAnimationComponent
90135

91-
1. Add the component to the chosen actor;
92-
2. Fill the `AnimatedComponents` array using the `SetAnimatedComponents` function in the construction script;
93-
* Only for scene components;
94-
* Omits nullptr entries;
95-
3. Fill the `TransformOffsets` array by hand;
96-
* The number of offsets must be equal to the number of animated components;
97-
4. Create or use the existing curve float object for the `AnimationCurve` variable;
98-
5. Setup animation behavior in blueprints;
136+
A scene component which rotates along the chosen axis.
99137

100138
#### Variables
101139

102-
1. `InitialState` - the initial state of the animation on begin play;
103-
2. `AnimationTime` - the length of the animation;
104-
3. `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;
105-
4. `AnimateWholeActor` - if true, the whole actor will be animated. Doesn't require call of `SetAnimatedComponents`;
106-
5. `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;
140+
1. `RotateX` - toggle rotation along the X axis;
141+
2. `RotateY` - toggle rotation along the Y axis;
142+
3. `RotateZ` - toggle rotation along the Z axis;
143+
4. `RotationSpeed` - determines the rotation speed along each axis;
107144

108145
#### Functions
109146

110-
1. `Start` - starts the animation;
111-
2. `Reverse` - reverse the current animation. Works only if current state is a transition state;
112-
3. `Pause` - pauses the animation;
113-
4. `Resume` - resumes the animation;
114-
5. `SetAnimatedComponents` - fills the Animated components array with the chosen scene components. It'll omit nullptr entries;
115-
6. `CanPlayAnimation` - returns if the animation can be played or not;
116-
7. `GetAnimationProgress` - returns progress of the animation;
147+
1. `SetIsRotating` - toggles rotation along XYZ axis;
117148

118149
### SplineAnimationComponent
119150

@@ -132,7 +163,7 @@ An actor component which moves an actor along a spline component using a timelin
132163
1. `AnimationMode` - a mode which determines how the animation will work;
133164
2. `SplineActor` - an actor which contains a spline component;
134165
3. `AnimationCurve` - a float curve object used by the timeline component for the animation;
135-
* It's better to use a curve with length equal 1.f;
166+
* It's better to use a curve with length equal 1.f;
136167
4. `AnimationTime` - length of the animation;
137168
5. `AnimationSpeed` - used for calculation of the animation time;
138169
* Great for splines with many points and when the animation time between them must be constant;
@@ -155,3 +186,38 @@ An actor component which moves an actor along a spline component using a timelin
155186
3. `AnimateTo` - animates to the chosen point. Works only in the manual mode;
156187
4. `Pause` - pauses the animation;
157188
5. `Resume` - resumes the animation;
189+
190+
### TimelineAnimationComponent
191+
192+
An actor component which animates transforms of the chosen scene components of an actor using a timeline.
193+
194+
#### Setup
195+
196+
1. Add the component to the chosen actor;
197+
2. Fill the `AnimatedComponents` array using the `SetAnimatedComponents` function in the construction script;
198+
* Only for scene components;
199+
* Omits nullptr entries;
200+
3. Fill the `TransformOffsets` array by hand;
201+
* The number of offsets must be equal to the number of animated components;
202+
4. Create or use the existing curve float object for the `AnimationCurve` variable;
203+
5. Setup animation behavior in blueprints;
204+
205+
#### Variables
206+
207+
1. `InitialState` - the initial state of the animation on begin play;
208+
2. `AnimationTime` - the length of the animation;
209+
3. `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;
210+
4. `AnimateWholeActor` - if true, the whole actor will be animated. Doesn't require call of `SetAnimatedComponents`;
211+
5. `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;
212+
213+
#### Functions
214+
215+
1. `Start` - starts the animation;
216+
2. `Reverse` - reverse the current animation. Works only if current state is a transition state;
217+
3. `Pause` - pauses the animation;
218+
4. `Resume` - resumes the animation;
219+
5. `SetAnimatedComponents` - fills the Animated components array with the chosen scene components. It'll omit nullptr entries;
220+
6. `CanPlayAnimation` - returns if the animation can be played or not;
221+
7. `GetAnimationProgress` - returns progress of the animation;
222+
223+

0 commit comments

Comments
 (0)