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
  • How it works
  • Requirements
  • Parameters
  • Path
  • Animal
  • Reactions
  • Events

Was this helpful?

  1. Main Components
  2. Path Constraint

MPath

PreviousPath ConstraintNextPath Link (Straight)

Last updated 2 years ago

Was this helpful?

Overview

MPath Component is the bridge between the Path Constrain and any Path/Spline solution you may use. It will take the values needed from a spline and it will translate them to constraint the character so it follows and stays on the path.

How it works

The MPath will use any type of IPath component to get the spline/path values. If an animal using a Path Constraint component enters the Colliders Bound of this component then the search for the closest point on the spline will start. if both search radius (MPath and Path Constraint ) are near, and Automatic is set to true then the character will be constrained to the Path.

Requirements

  • Any type of collider set as a trigger. (Box Collider Recommended)

Parameters

Path

IPath

Add your solution to the path and then hit the refresh button.

Automatic

The character will be constrained to the path as soon as both Search Radius instersect

Some paths are set to not be Automatic. To activate the, go to the Path Constraint component, add an Input connection, and use the method TryEnterExitPath().This also works for exiting a path in the middle of it.

AutoChangePath

This allows to change automatically to a new path when the character is already in another path. The new path needs to be set to automatic also.

Lock Rotation

The character cannot rotate or change direction while on the path. (The character can walk backward)

Follow Direction (Lock Rotation = True)

When lock rotation is true you can set the follow direction on the Path, this will automatically rotate the character to match the correct orientation during the path.

  • None: the Character will keep the starting path orientation when entering from the start or the end of the spline

Entering from End
Entering from Start
  • Forward: The Character will be oriented to the Forward Path orientation (Start to End)

Entering from End
Entering from Start
  • Backward: The Character will be oriented to the Backward Path orientation (End to Start)

Entering from End
Entering from Start

Use Path Rotation

The Character will follow also the Path rotation values

Alignment Offset

Applies an offset to the Character during the Path Constraint

Path Position

Use this Transform to have a gameobject follow the current position of the Character on the Path

Can Exit on Start

The Character can exit automatically if it reaches the Start of the Spline

Can Exit on End

The Character can exit automatically if it reaches the Start of the Spline

Can Exit on Middle

The Character can exit automatically if a state interrupts the spline constraint. (E.g. Jumping on the middle of the spline)

Interval

When the character is inside the Path bounds then a search will start to find if the character can be constrained when the search radius intersects. The interval is the time to execute this search. increase this value to increase performance. Reduce it to increase precision.

Interval = 0.5f
Interval =0f

Path Cooldown

Once the character activates the path constraint, this time will need to elapse in order to exit the path again. This is useful to avoid entering and exiting the path in the same frame.

Search Radius

Radius to search a nearby Path Constraint component. When the Path Constraint sphere trigger and the Path sphere triggers intersect. It means the Character can activate a path.

Search Offset

An offset of the Radius value relative to the Path position.

Path Bounds

Collider assigned to the Path. This allows us to calculate searching for a character only when a character is inside the trigger.

Layer

Filter what Layer can be used on the Paths (Animal Layer is the Default).

Animal

Activate State

What state to activate when entering the path

Ignore Vertical

When is active the Animal cannot move on the Y-Axis while is on the path. Disable this if you want to Jump while on the path.

(img)

Ignore Grounded

Ignore grounded can be used when there is no terrain or ground beneath the path..

(img)

Disable States

Disable States on the Character while is on the path. E.g. while on the path you can disable the Jump State.

(img)

Ignore States

States that will force an early exit on the path. E.g. Jump can force exiting the path if the Jump State is on this list.

(img)

Exit Any Mode

If enable, playing any mode will exit the path

Ignore Modes

Modes that will force an early exit on the path. E.g. Damage can force exiting the path if the Damage Mode is on this list.

(img)

Reactions

...

Events

...

Any type of IPath Component (, ,)

Type of Path solution to use, you can use any of the 3 solutions included (, ,)

〰️
〰️
Path Link (Straight)
Path Link Cinemachine
Path Creator
Path Link (Straight)
Path Link Cinemachine
Path Creator
Box collider to limit the path bounds