⭐Introduction
This page will provide a high-level overview of how the system works
Last updated
This page will provide a high-level overview of how the system works
Last updated
The FPS Animation Framework is based on the single component - FPSAnimator or CoreAnimComponent. This component applies procedural animation layers and controls animation blending:
FPSAnimator, however, does not contain the actual animation logic. Instead, it has a list of Animation Layer components:
In runtime, the FPSAnimator iterates over all Animation Layers and applies procedural logic by calling the UpdateLayer()
method.
Animation Layer components are standard MonoBehaviour components, which are hidden by default in the inspector. You can access them via GetComponent<>()
, and other methods.
Here's an example:
In the example above we grab a reference to the AdsLayer, and then adjust its behaviour based on the current aiming state. You can do this with any other Animation Layer component
Now let's take a look at the Playables Animation System feature.
This animation system extends the standard Unity Animator Controller, by manually overriding the character upper body with custom animations.
Tip: the main purpose of this system is to dynamically play animations and static poses on the character upper body. Simple as that!
These custom animations are overlay poses and dynamic motions (e.g. reloading, grenade throwing, inspect, etc.).
Overlay Pose is a static, one-frame animation, which is used as a base pose in the Playables Animation System. Here's how it works in runtime:
The system overrides your character upper body with an Overlay Pose.
The system applies dynamic motions on top of the Overlay Pose.
The system applies Animation Layers, IK, etc.
The Overlay Pose is sampled on the character when a weapon is equipped. This is required for the system to properly position the IK objects.
All motions in the Playables Animation System are represented as AnimSequence - a Scriptable Object, that contains additional settings for your animations:
That was a quick introduction and a very high-level overview of the system. We will later dive into the very details, but now let's see how we can set up the framework from scratch, using a custom character.