Animal Controller
📥 Integrations📑 Changelog✅Social
  • 🤝Welcome to Malbers Animations Assets
  • 🌐Discover all my Assets
  • 💫What's New
  • 🌀Upcoming assets
  • 📋Changelog
  • ↗️Upcoming Changelog
  • 🛣️Road Map
  • ✍️End User Licence Agreement
  • 🌟Features
  • Improve Performance Tricks
  • 😓Know Limitations so far
  • 📥Downloads
  • QuickStart
    • 📖Guide to use All Malbers Assets with (AC)
    • 🔼Upgrade to URP
    • 🔼Upgrade to HDRP
    • 💔Common Issues
    • 🔔Tips and Tricks
  • Guides and Tutorials
  • 📺YouTube Tutorials
    • 📺Video Tutorials (On Queue)
  • 📱Mobile Setup Guide
    • Mobile Joystick
  • 🧐How to: Animal Controller
    • 🔹Play a Mode while Moving
    • 🔹Create and configure a new mode
    • 🔊Adding Sound Effects
    • 🔹Rebone Mesh Tutorial (Skin Mesh is Missing)
    • 🔹Add Movement with Non RootMotion Animations
    • 🔹Fetch a ball
    • 🔹Set up Timeline
    • 🔹Make Animal flee when see the animal Player
    • 🔹Animal Controller for Humanoids
    • Create a Shootable Weapon From Scratch
    • ⚔️How to Fix weapons offset and values (Bow, Pistol)
    • ✨Add a Effect to the Effect Manager
    • 🕹️Connect Inputs to the Controller
    • Modify the controller with a Stat
    • Use the Modify Stat Component
    • 📡Use a MEvent and MEvent Listeners
    • 💎Change from Faceted to Smooth poly art Animals
    • ⁉️Listen when an Mode starts or ends
  • 🐎How to: Horse Animset Pro
    • 🐴Call the Mount
    • 🤠Change Meshes for the Rider
    • 🏇Make any animal mountable
  • 🕺Strafing
  • Main Components
    • 🐺MAnimal Controller
      • General
        • Pivots
      • Speeds
      • 🔷States
        • 🕴️Idle
        • 🏃‍♂️Locomotion
        • 🌠Fall
        • 🤾‍♀️Basic Jump
        • 🤾‍♂️Root Motion Jump
        • 🐟Swim
        • 🐊UnderWater
        • 🧗‍♂️Climb
        • 🧗‍♂️Ledge Grab
        • 🦅Fly
        • 🪂Glide
        • 🧗Wall Run
        • 🧗Wall Run Vertical
        • ⛷️Slide
        • ☠️Death
        • ☠️Death Ragdoll
        • 🆕Creating a new State
      • 🟩Modes
        • 🟩Mode Behavior
        • 🟩Mode Sequence
      • 🅾️Stances
      • Advanced
      • Animal Modifiers
      • Events
      • Debug
      • Animal Animator Behaviors
      • Methods and Properties
    • 🎮Malbers Input & MInput
      • Methods and Properties
    • 🤖AI
      • AI Animal Control
      • MWayPoint
      • Wander Area
      • AI Target
      • Animal Brain
        • AI States
        • Tasks
          • General - Chance
          • General - Empty
          • General - Invoke Event
          • General - Send Message
          • General - Play Audio
          • General - Quick Align
          • General - Reaction
          • General - Set Look At Aim
          • General - Set Stat
          • General - Wait
          • Animal - Set Speed
          • Animal - Play Mode
          • Animal - Set/Play State
          • Animal - Set Stance
          • Animal - Set Strafe
          • Movement - Move Stop
          • Movement - Patrol
          • Movement - Set Destination
          • Movement - Set Target
          • Variables - Set Var Listener
          • Weapons - Weapon Tasks
        • Decisions
          • General - AND
          • General - Check Stat
          • General - Compare Stats
          • General - Look
          • General - OR
          • General - Is Task Done?
          • General - Wait
          • Movement - Has Arrived
          • Movement - Check Target
          • Animal - Check Mode
          • Animal - Check Stance
          • Animal - Check State
          • Variables - Check Scriptable Variable
          • Variables - Check Transform Var
          • Variables - Check Var Listener
          • Runtime Set - Is Target in Runtime Set
      • 📌Point Click
    • 🧨Reactions
    • 📶Combo Manager
    • ⚔️Weapon Manager
      • 🛡️MWeapon [General] Properties
      • 🛡️MWeapon [Damage] Properties
      • 🛡️MWeapon [IK] Properties
      • ⚔️MMelee
      • 🔫MShooteable
      • 🏹Bow
    • 〰️Path Constraint
      • 〰️MPath
      • 〰️Path Link (Straight)
      • 〰️Path Link (Cinemachine Path)
      • 〰️Path Creator(Sebastian Lague)
    • Speed Ground Changer
  • Scriptable Architecture
    • 💠Scriptables
      • 🔹Bool Var
      • 🔹Int Var
      • 🔹Float Var
      • 🔹String Var
      • 🔹ValueToString
      • 🔢Variable Listeners & Comparers
      • 🔰IDs
      • 🎫Tags
      • 🪝Transform Hook
      • 📣MEvents
      • 📣MEvent Listener
      • 📦Runtime gameobjects
    • 🔤MLocal Variables
  • Secondary Components
    • ⚔️MDamager
      • 🐾MAttack Trigger
      • 🐾Attack Trigger Behavior
      • 🏉MProjectile
      • 🏹Projectile Thrower
      • 🤯MExplosion
    • 🤕MDamageable
    • 🧊Zones
      • Public Methods
    • ✊Pick Up - Drop
    • ✊Pickable
    • 🚩Respawner
    • 🚩Respawner NPC
    • 🚩Simple Respawner
    • 🏁CheckPoint
    • IK Manager
      • IK Processors
      • Weight Processors
  • Global Components
    • 🧡Stats
      • 🔸Stat Modifier
      • 🔸Modify Stat <Component>
      • 🔸Modify Stat <Asset>
      • 👨‍💻Public Methods
    • Animator Behaviours
      • Message Behaviour
      • Random Behaviour
      • Is Kinematic Behaviour
      • Sound Behaviour
      • Rigid Constraint Behaviour
    • 🟩Trigger Proxy
    • 🔌Interactable
    • ⚡Interactor
    • ⁉️Conditions
    • 🎥Free Look Camera
    • 🎥Cinemachine
    • UI
      • Unity Utils
  • Riding System (HAP)
    • Horse Animset Pro (HAP) Riding System
    • The Art of (HAP)
    • Mount
      • Methods and Properties
    • MRider
      • Methods and Properties
    • Mount Triggers
    • Mount Points
  • Utilities
    • Material Changer
    • Active Meshes
    • Effect Manager
    • Effect Behavior
    • Animator Event Sounds
    • Blend Shapes
      • Blend Shape Preset
    • Look At
    • 🏹Aim
    • 🎯Aim Target
    • 🎯Lock On Target
    • 🐾Steps Manager
    • 🐾Step Trigger
    • 🔗Mode Align
    • 🔗Aligner
    • Component Selector
    • MAnimalAnimatorSync
    • Multiple Time Checker
    • MAnimalAnimatorSync
  • Annex
    • 🗃️Integrations
      • General HAP Integration
      • Rewired
      • Invector Templates
        • Invector Weapon Settings
      • Animals Controller + Invector
      • Ootii's Motion Controller
      • Opsive Ultimate Character Controller (UCC 3.03)
      • Opsive Ultimate Character Controller (UCC 3.08) Generic
      • AStar Pathfinding
      • Unity Input System (NEW)
        • New Input Link [Old Versions]
      • Game Creator
      • Game Kit Controller
    • Contact
    • 🤔FAQ
    • Refund Policy
  • Games using Malbers Animations
  • Interfaces
    • IAITarget
    • IWayPoint
    • IAIControl
    • IAim
    • IAlign
    • IGravity
    • IInteractor
  • ULTIMATE SELECTOR
    • Overview
    • Selector Manager
    • Selector Editor
    • Selector Controller
    • Selector Item
    • Selector UI
    • Selector Data
    • Changelog (Selector)
  • 🎒Malbers Inventory Add-On
    • Overview
      • Compatibility Matrix
      • Roadmap
      • Update Notes
  • Updating from v1.1.1 to v1.2 Instructions
  • Basic Setup Instructions
    • Creating a new Item
      • Adding Buffs/Debuffs to Items
      • Setting up Item Reactions
      • Custom Rarities
    • Setting up Item/Inventory Types
    • Set up the Pick/Drop Component
    • Setting up the Notifications
    • Setting up the Item Info panel
  • Inventory Set
    • Events
  • Inventory Master
  • Notification Manager
    • Notification Child
    • Events
  • Save/Load System
  • Item Spawner
  • Storage Chests
    • Chest Inventory
    • Chest Inventory UI
  • Using Armour
  • Shop System
    • Shop
    • Shop UI Manager
  • Cooking System
    • Create a new Recipe
  • UI Manager
  • Hotbar
Powered by GitBook
On this page
  • Overview
  • Creating the Fly State
  • Priority
  • Requirements
  • Rotator
  • Up Down Input
  • Activation
  • By Input
  • Using a Zone
  • Using a Reaction
  • Exit Conditions
  • Common State Tag Properties
  • Limits
  • Animator
  • Tag Modifiers
  • Speed Set
  • Fly Parameters
  • Bank
  • Pitch Limit:
  • Bank Strafe
  • Pitch Strafe
  • Max Height
  • Inertia Lerp
  • Take off Impulse
  • Impulse Time
  • Impulse Curve
  • Can Land
  • Land On Layer
  • Land Multiplier
  • Inertia Lerp
  • Avoid Surface
  • Surface Layer
  • Surface Distance
  • Gliding
  • Flap Speed
  • Glide Speed
  • Glide Only
  • Glide Only Idle S
  • Glide Only Idle V
  • Auto Glide
  • Glide Chance
  • Flap Chance
  • Variation
  • Down Acceleration
  • Gravity Drag
  • Down Acceleration
  • Bone Block Landing
  • Bone Name
  • Bone Offset Position
  • Block Land Distance

Was this helpful?

  1. Main Components
  2. MAnimal Controller
  3. States

Fly

1.4.2d

PreviousLedge GrabNextGlide

Last updated 1 year ago

Was this helpful?

Overview

The Fly State allows the animal to fly and glide. Its State is 6.

Creating the Fly State

To create a new Fly State Click the Plus button on the States list

Or just duplicate any of the already created Fly States Assets of any animal you own and drag it to the States List.

Priority

Requirements

Rotator

This Rotator Gameobject will be the parent of the RootBone of the Character (First bone of the hierarchy)

Its local Position and Rotation value should be (0,0,0)

Without setting this 'Rotator' gameObject on the Advanced tab the Fly State won't work properly

Up Down Input

To move Up and Down on the Y-Axis the Animator Requires also the Optional parameter: UpDown.

This input is created automatically when the asset is installed.

You can create it manually by clicking on the [Create] Button of the Malbers Input Component.

This will allow the Animal to go Up by pressing [Space], or Down by pressing [C].

Activation

This state mainly uses an Input value to be Activated.

By Input

When Pressing the Input Value for Fly

To create a quick Input for Flying use the Malbers Input context menu:

This will be connected automatically with the state if the state has the same value for its Input.

Using a Zone

A Zone can activate the flying state.

Using a Reaction

Exit Conditions

Through code, the exit conditions will be executed to check if the State can exit. In the case of this state, the conditions are:

Common State Tag Properties

These are the General tag option for the Fly state:

  • Main Tag [Fly]

◻️RootMotion

☑️Sprint

◻️Gravity

◻️Grounded

◻️Custom Rotation

◻️Orient To Ground

☑️Ignore Lower States

◻️Persistent = False

◻️Lock Move

◻️Lock Input

☑️+ Root Speed = True

☑️ + Pos Speed

☑️ Free Movement

Limits

You can set all the limits you need for your state.

The limits will block the state from Activating.

Animator

The Fly state requires Animation States that are in charge of the Fly movement.

All states have a core animation state. For fly is a blend tree with the Tag Fly.

Since the State is a moving state, the Speed Multiplier must be set as Parameter "SpeedMultiplier"

This Blend Tree is usually set this way:

If you don't have all the animations, you can fill the missing states with duplicate animations

Tag Modifiers

The Fly State has a “TakeOff” and "Land" tag Modifier by default. This allows the fly state to have an entering and exiting animations before and after entering the core animation, which allows to modify core parameters on the Animal Controller while it is playing any of those animations.

If your character does not have the Take Off or Land Animations this can be ignored.

The values for the Animal parameters that the TakeOff and Land modify are:

Speed Set

Fly Parameters

Bank

Banking angle amount used while turning

Pitch Limit:

Limit Angle to Pitch the animal while going up and Down

Pitch Limit = 30 Pitch Limit = 80 (Default)

Bank Strafe

Amount of banking the character can do while strafing and Flying.

Pitch Strafe

Amount of Pitch Rotation the character can do while strafing and Flying.

Max Height

Max Height the character can fly

Inertia Lerp

When Entering the Fly State... The animal will keep the Velocity from the last State if this value is greater than zero

(img)

The take-off parameters will apply a force upwards to the character. This is usually used when the character does not have take-off animations.

Take off Impulse

How much upward force will be applied

Impulse Time

For how long the take-off impulse will be applied

Impulse Curve

Curve value to apply to the TakeOff Impulse

Can Land

If the Animal is close to an object with the Land On Layer, it will automatically Land. (it will exit the Fly State)

Land On Layer

Layer to search for Landing surfaces.

Land Multiplier

Ray Length multiplier to check for ground and automatically land (It uses the Chest Pivot as guide for the Land Ray)

Inertia Lerp

When entering the Fly State... The animal will keep the velocity from the last State for a time if this value is greater than zero.

Avoid Surface

If enabled, It will avoid landing on any object using a surface layer mask. This is used usually for animals that cannot land on Water.

Surface Layer

Layer mask to search for surfaces that the animal cannot land.

Surface Distance

The minimum length, the character will be placed above that surface, to keep it from touching that surface.

Gliding

Flap Speed

Which Speed in the Animation Blend tree will be used to Flap the wings

Glide Speed

Which Speed in the Animation Blend tree will be used to Glide with the wings

Glide Only

The character will activate only the glide animations and it cannot go upwards

Glide Only Idle S

When the Forward Input is Released, this will be the movement speed the gliding will have

Glide Only Idle V

When the Forward Input is Pressed, this will be the movement speed the gliding will have

Auto Glide

If Enabled the animal will change from flapping to gliding automatically

Glide Chance

Time range the animal will glide when Auto Glide is true

Flap Chance

Time range the animal will flap the wings when Auto Glide is true

Variation

Variation to make Random Flap and Glide Animation

Down Acceleration

Gravity Force applied to the Fly State.

Gravity Drag

If the value is greater than zero the character will go down gradually while flying.

Down Acceleration

If the character plunges down toward the ground it will gain speed depending on the value of this parameter.

Bone Block Landing

Sometimes when the animal is very large and has a large head the landing may be blocked by the head and it cannot properly land. that is why, when Can Land is active, a second ray is cast from another bone (Head) to see if we can find ground to land.

Bone Name

Name of the Bone. By default is "Head"

Bone Offset Position

Local Offset position from the bone position

Block Land Distance

Ray Distance for finding the ground from the Bone

The state should have a higher priority than , and . but below since the animal can be killed any time.

When the animal is on the this state, all the Lower priorities states are ignored until the for this state are fulfilled.

The State requires an Empty Transform set as a . This Rotator is the pivot of the Pitch rotation of the animal while flying.

Animal Reactions can be used to activate the state. Check

The animal is flying near the ground so he can land (when is enabled)

The Input for fly is released (when the is set to pressed)

The Input for fly is toggled to off (when the is set to toggle)

The Fly needs a new that affects the Fly State. When creating for the first time the Speed Set will be added automatically to the Animal Controller:

If your Fly animations are NOT RootMotion or they don't have the movement and turning speed you desire, then you need to increase the and values to be greater than zero

🐺
🔷
🦅
Idle
Locomotion
Fall
Death
Rotator
Reactions
Speed Set
exit conditions
Can Land
Fly Input
Fly Input
Position
Rotation
ID
The Rotator Game Object is used as the Rotation Pivot for going up and down
All Free movement states needs the Rotator Bone set.
Bank = 30
Bank = 0
Higher Lerp values will remove faster the acumulated inertia from the last state
The raven will not enter the water and it will keep a distance
Vertical =1 is the Flap Speed. Vertical = 2 is the Glide Speed in the Blend Tree