Animation System
A procedural system that makes creating smooth and fluid animations easier than ever.
Last updated
A procedural system that makes creating smooth and fluid animations easier than ever.
Last updated
The purpose of the procedural animation system is to enable the creation of any type of animation. While it is not intended to create full reload animation, it may be used to create other types of animations, such as sprint, walk, jump, aim, crouch, camera movement, etc...
The system relies on 2 main components, ProceduralAnimator and ProceduralAnimation. The procedural animator manages all of its animations and calcautes the total values then applies them. The animation itself does behave on its own to get the total values from the itself and its modifiers.
To start using the system, first add the component ProceduralAnimator to the object you want to animate, like this:
Layers Holder
A game object that has all animations.
Weight
How much effect all animations have.
Position Weight
The level to which the outcome position of every animation is affected.
Rotation Weight
The level to which the outcome rotation of every animation is affected.
The animator needs a game object that hold all animations as children, this game object is refered in the Animator as "Layers Holder", create en empty game object as a child of the object you want to animate and assgin it to the "Layers Holder" field in the Procedural Animator component.
In the "Layers" game object create a new empty game object and give it a name (Suggested to be the animation name)
On the new empty game object you have created, add the component Procedural Animation:
After addin the Procedural Animation component, 2 other component have been added by automaticly which are Procedural Animation Trigger and Procedural Animation Modifiers Manager.
Name
The name of the animation which the animator can find it with.
length
The length of the animation.
Weight
How much effect this animation has on the total values of the animator
Default position
The default position offset of this animation.
Default rotation
The default rotation offset of this animation.
Position
The target position (To move to) of this animation
Rotation
The target rotation (To move to) of this animation
Connections
The connections this animation has, this could be used to sync multiple animations together.
Events
The default events of this animations which are, On Trigger (Enter, Stay and Exit)
Custom Events
The custom events in a custom location of this animation. A location of 0.5 is in the middle of the animation.
The animation component itself, doesn't do anything unless it's triggered. To trigger the animation it could be done by calling this function:
This is how to trigger it with code, but using the ProceduralAnimationTrigger component is an easier method to trigger it without code. The ProceduralAnimationTrigger component is already on the same game object as the animation.
Input Action
The input action of this animation trigger, it can be used to trigger the animation using a key
Type
The type of this animation trigger, if set to None it won't be triggered unless it's done via code, other values (Toggle and Hold) are the type of input.
On Trigger (Enter, Stay and Exit)
The methods which the animation trigger is called when it enters the trigger state or stays or leaves it.
To use the input to trigger the animation, set the "Type" in the animation trigger component to one of the two, Hold or Toggle, then add a new binding to the Input Action.
The animations accept modification via any of their modifiers. To add any of the default modifiers (Kick, Spring, Wave, and Offset), add the appropriate components to your animation; e.g., the component for the kick modifier is called "KickModifier."
To create new modifier, first create a new script. This is the new script:
First thing to change, is to add the namespace "Akila.FPSFramework". like this:
The animation system won't identify this animation unless it's inherited from "ProceduralAnimationModifier." Change the introduction to it. Like this:
You should read the base class ProceduralAnimationModifier's content before writing a new modifier.
Now you can change the base class' values, as they will be moved over to the base animation.