📗
FPS Animation Framework Legacy
  • 👋Welcome!
  • ⭐Introduction
  • Tutorial
    • 🌟Getting started
      • 🏃‍♂️Character setup
      • 📷Camera setup
      • 🔶Layers setup
      • 🔷Controller setup
      • 🔫Weapon setup
    • 💻Integration
      • 🏃‍♂️Character
      • 🔫Weapon
      • 🔸Layers and animator
    • 🔥Animation Workflow
      • 🦿IK Rig
      • 🔧Character Animation
      • 🔧Weapon Animation
    • ❗Troubleshooting
      • ❔Issue with IK, Left Hand, ADS
      • ❔Broken Character Pose
      • ❔Spinning Character
      • ❔Left Hand IK Always Active
      • ❔Left Hand IK Error
      • ❔Transform NaN Error
  • Fundamentals
    • 🦾Animation System
      • 🔹Playables Sub-System
      • 🔹Curve-blending
      • 🔸AnimSequence
      • 🔸Weapon Bone
      • 🔸IK Animation System
      • 🔸Weapon Anim Asset
    • 🔶Animation Layers
      • Ads Layer
      • Left Hand IK Layer
      • Right Hand IK Layer
      • Locomotion Layer
      • Look Layer
      • Recoil Layer
      • Sway Layer
      • Leg IK
      • Weapon Collision
      • Slot Layer
      • Pose Blending
  • Tools
    • 🟢Validator Tool
Powered by GitBook
On this page
  • How does it work?
  • Playables Animation System
  • Post Scriptum

Introduction

This page will provide a high-level overview of how the system works

PreviousWelcome!NextGetting started

Last updated 1 year ago

How does it work?

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:

ExampleController.cs
private AdsLayer _adsLayer;

private void Start()
{
    _adsLayer = GetComponent<AdsLayer>();
}

private void DisableAim()
{
    ...
    adsLayer.SetAds(false);
    ...
}

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.

Playables Animation System

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:

Post Scriptum

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.

⭐
FPSAnimator component.
Animation layers.
Example AnimSequence.