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)
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
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.
Copy and paste the default AnimationOverride object into your project folder
"Assets/AirshipPackages/@Easy/Core/Prefabs/Character/Animations/AirshipCharacterOverrider.overrideController"
In your Character prefab variant, set the animators controller to be your override asset
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:
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.
Create a new AnimationClip in your project and name it
Bring the animation dummy prefab in to your scene
"Assets/AirshipPackages/@Easy/Core/Prefabs/Character/CharacterAnimationDummy.prefab"
On the root object add your animation clip reference to the Animation component
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.
Last updated