๐Ÿงพ
FPS Animation Framework
  • ๐Ÿ‘‹Welcome!
  • Workflow
    • ๐ŸฆพCharacter Rig
    • ๐Ÿ”ŒComponents
    • ๐Ÿ”ธProfiles and Layers
    • ๐Ÿ”—Linking
    • โž•Integration
    • โ–ถ๏ธPlaying Animations
    • ๐Ÿ’ปExtending the System
  • Demo Project
    • โœจResources
    • ๐ŸŽฎController
    • ๐Ÿ”ซWeapons and Items
    • โž•Attachment System
  • Fundamentals
    • ๐ŸฆพRig
    • โš™๏ธFramework Architecture
    • ๐Ÿ“‘Animator Profiles
    • ๐Ÿ“œAnimator Layer
    • ๐ŸŽฎInput System
    • ๐Ÿ”ถAnimator Layers
      • Weapon Layer General
      • Additive Layer
      • Ads Layer
      • Attach Hand Layer
      • Collision Layer
      • IK Layer
      • IK Motion Layer
      • Look Layer
      • Pose Offset Layer
      • Pose Sampler Layer
      • Sway Layer
      • View Layer
      • Blending Layer
      • Turn Layer
    • ๐Ÿ“šNew Animation Library
    • โš’๏ธTools
  • Recoil System
    • ๐Ÿ”ซRecoil Animation
    • ใ€ฝ๏ธRecoil Pattern
    • ๐Ÿ“นCamera Shake
  • Troubleshooting
    • โš ๏ธInitialization Warnings
    • โš ๏ธCan't Look Around
    • โš ๏ธWeapon Positioning
    • โš ๏ธWeapon is not moving
  • โš ๏ธAiming doesn't work
  • โš ๏ธTwisted feet when looking left/right
  • ๐ŸŒŒMisc
    • ๐Ÿ“œChangelog
      • 4.7.0 Update
Powered by GitBook
On this page
  • Animation Asset
  • Code
  1. Workflow

Playing Animations

In this section we will find out how to play custom animations in runtime.

PreviousIntegrationNextExtending the System

Last updated 9 months ago

Animation Asset

The FPS Animation Framework uses Animation Assets to play custom animations on your character from code. To create a new asset, right-click and go to Create/KINEMATION/FPS Animator General/Animation Asset:

First, you must specify the Rig Asset - it will be used to pick the curve names via a popup widget. Then, make sure to assign the actual Animation Clip.

  • Mask property is optional, but you can use it if you need to affect a specific part of the body.

  • Override Mask and Is Additive are used for shared animations, like emotes, grenade throws, etc. The Override Mask will make the left arm use absolute animation, while the right arm will only use additive motion.

  • Blend Time controls the transition for your animation. The Rate Scale is a playback speed multiplier.

  • The Curves list defines custom curves, which will be used in this animation. This is an extremely useful feature when you want custom animations to control animation features.

Example: let's say we want to disable left-hand IK when reloading. Add the MaskAttachHand curve to the animation, set its value to 1. Now we can use this curve as a mask parameter in the left-hand IK layer, which will blend it out when the animation is playing.

Code

To play an Animation Asset from code, you need to call the PlayAnimation method on the IPlayablesController:

// Where yourAnimation is an Animation Asset.
// Second parameter is the start time.
_playablesController.PlayAnimation(yourAnimation, 0f);

In the next section, we will learn how to create custom animation features.

โ–ถ๏ธ