🚢
Airship
  • Getting Started
    • Welcome to Airship
    • Installing Airship
  • TypeScript
    • Overview
    • AirshipBehaviour
      • Adding Inspector Properties
      • AirshipSingleton
      • Using Component Decorators
      • Accessing Other Components
  • Publishing
    • Publish Game
    • Developer Console
  • Networking
    • Multiplayer
    • Local Server Mode
    • Network Signals
    • Network Functions
    • Network Identity
    • Network Transform
  • Input
    • User Input
      • Actions
      • Keyboard
      • Mouse
    • Proximity Prompts
  • Core Package
    • What is the Core Package?
    • Chat Commands
    • Inventory
    • Spawning Characters
    • Enable / Disable Core Features
  • Physics
    • Physics Settings
    • Physics Layers
  • Platform Services
    • Data Store
      • Locking
    • Cache Store
    • Leaderboards
    • Platform Inventory
    • Server Management
    • Server List
    • Server Transfers
    • Users
    • Parties
    • Matchmaking
    • External Services
  • CHARACTERS
    • Quick Configuration
    • Character Movement System
      • Character Movement Data
      • Character Movement Events
    • Character Camera
      • First Person Camera
      • Simple Usage
      • Camera Structure
      • Default Camera Modes
      • Disabling the Camera System
    • Character Animations
      • Character Blender Animations
      • Character Ragdoll
  • Accessories
    • Accessories Intro
    • Creating Accessories
    • Using Accessories
  • ANIMATIONS
    • Animation Events
  • Optimization
    • Live Game Profiler
    • Reducing Bundle Size
  • Game Settings
    • Game Visibility
  • Other
    • Project Status
    • FAQ
    • DataType Math
    • JS to Luau
    • Tags
    • Terrain
    • AirshipNetworkBehaviour
      • Lifecycle Events
      • ServerRpc
      • ObserversRpc
      • TargetRpc
    • VoxelWorld
      • Voxel World Getting Started
      • Voxel World Tips
      • Prefab Voxels
      • QuarterBlocks
    • Easy Helper Utils
      • Easy Motion
      • Easy Grid Align
      • Easy Look At
      • Easy Shake
      • Easy Destroy
Powered by GitBook
On this page
  • Core Animations
  • Animation Overrides
  • Character Animation Events
  • Creating New Character Animations
  1. CHARACTERS

Character Animations

Core Animations

Airship Core has existing animations for jogging, sprinting, jumping etc. They will automatically be used on your characters but you can also customize and play your own animations.

There are two classes to help you control animations

Character Animation Helper (A C# class)

Character Animator (A TS class)

Why are there two animation classes? We need a C# to directly access some of Unity's animation features, as well as for more optimized calls that happen every frame. But we also need to capture and use data in Typescript.


Animation Overrides

To play an animation on top of the core system you can use the override functions

You can play custom animations using character.animationHelper.PlayAnimation

public animClip?: AnimationClip;
...
if(this.animClip){
    //Play anim clip on Override Layer 1 with a transition time of .1 seconds
    this.character.animationHelper.PlayAnimation(this.animClip, CharacterAnimationLayer.OVERRIDE_1, 0.1);
}

You can also replace the core animations by using an AnimationOverride asset. This allows you to drag and drop AnimationClips for specific actions without any code.

  1. Copy and paste the default AnimationOverride object into your project folder

    "Assets/AirshipPackages/@Easy/Core/Prefabs/Character/Animations/AirshipCharacterOverrider.overrideController"

  2. In your Character prefab variant, set the animators controller to be your override asset

  3. Replace any default animation clips with your custom movement animation clips on your override controller

Character Animation Events

To easily listen to character animation events in Typescript, connect to the OnAnimationEvent Signal on Character.animation:

this.character.animation.OnAnimationEvent.Connect((key)=>{
    if(key === "MyAnimationEvent"){
        //Do Stuff
    }
});

Creating New Character Animations

Animations built for the Character must match the Characters Rig. The easiest way to animate for the character in Unity is to drag the CharacterAnimationDummy into your scene. This gives you bone gizmos and access to the animator at the root. Then you can use the Animation window to edit keys.

  1. Create a new AnimationClip in your project and name it

  2. Bring the animation dummy prefab in to your scene

    "Assets/AirshipPackages/@Easy/Core/Prefabs/Character/CharacterAnimationDummy.prefab"

  3. On the root object add your animation clip reference to the Animation component

  4. Open the Animation window and you can now select and edit your animation clip. Use the record button to auto generate keys as you move the characters rig.

The Airship Character prefab is used for third person views.

The Character View model prefab is for first person.

PreviousDisabling the Camera SystemNextCharacter Blender Animations

Last updated 9 months ago

Characters by default use the AnimationEventListener component to listen to animation events. You can read more about the system on the .

You can also by downloading our character rig animation file. You will need to setup actions for each animation and export them to an FBX file which can be brought into your Unity project.

Animation Events Page
Create Animations From Blender