📗
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
  1. Fundamentals
  2. Animation System

Curve-blending

In this section you will learn more about curves

Tip: curves are a great tool to control the blending of procedural animations. CoreAnimGraph comes with a special system for curves, which allows you to add custom curves to the animation and use them in runtime to control the layer blending.

As Playables API does not support curve blending out of the box, CoreAnimGraph has its own system for curve blending.

The curve names are specified in the Runtime/Core/Types/CurveLib.cs:

CurveLib.cs
public static readonly List<string> AnimCurveNames = new()
{
    "MaskLeftHand", 
    "MaskLookLayer", 
    "WeaponBone", 
    "Overlay"
};
  • MaskLeftHand - used to disable Left Hand IK Layer. If 1 - layer is disabled, 0 - enabled.

  • MaskLookLayer - used to disable Look Layer. If 1 - layer is disabled, 0 - enabled.

  • WeaponBone - defines the object the weapon will move along with. This will be later explained in IK Animation System.

  • Overlay - controls the weight of the animation graph. If it's 1 - the graph is enabled, and 0 otherwise.

These curves are used for animation layers (e.g. Locomotion Layer or Left Hand IK Layer) to have a better control over the IK blending. Such curves are attached to an AnimSequence.

It's also possible to use curves from the Animator Controller, let's take a look at the example to understand the difference:

YourCustomLayer.cs
// Will select a curve for the CoreAnimGraph
[AnimCurveName(false)] [SerializeField] private string graphCurveName;

// Will select a curve from your Animator Controller
[AnimCurveName(true)] [SerializeField] private string animatorCurveName;

public override void OnAnimUpdate()
{
    //... Your implementation
    float graphCurveValue = GetCurveValue(graphCurveName);
    float animatorCurveValue = GetAnimator().GetFloat(animatorCurveName);
}
AnimCurveName(bool isAnimator) //false by default.  
PreviousPlayables Sub-SystemNextAnimSequence

Last updated 1 year ago

🦾
🔹