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
  • Requirements
  • Collider
  • Trigger Proxy
  • Pickable
  • How it works
  • How to set it up
  • Parameters
  • Pick Up Area
  • Hide Pick Area
  • Holder
  • Offsets
  • Item
  • Focused Item
  • Events
  • On Can Pick Item (Boolean)
  • On Item Picked (GameObject)
  • On Item Focused (GameObject)
  • On Picking (int)
  • On Dropping (int)
  • Methods and Properties
  • Pickable FocusedItem {get;}
  • bool Has_Item {get;}
  • public Pickable Item {get; set;}
  • void TryPickUp()
  • void TryPickUpDrop()
  • void TryDrop()

Was this helpful?

  1. Secondary Components

Pick Up - Drop

✔

PreviousPublic MethodsNextPickable

Last updated 2 years ago

Was this helpful?

Overview

This component allows the animal to carry single objects, carry and drop them. At the moment only can carry one object.

Requirements

Collider

It requires any type of collider set as Trigger.

Trigger Proxy

It is recommended to add it on the Editor so you can set the Layers to interact with the Pick Up Component.

Pickable

How it works

The animal will use the Trigger Area assigned to find pickable objects. If any of this objects enters the Trigger area the Pick component will focus on the object.

To continue the Pick logic, you can assign an Input to execute the TryPickDrop method.

This will execute the Pick Logic when there's an item focused and it will execute the drop logic when the animal has an item picked.

How to set it up

You can create an internal Gameobject inside the character hierarchy to have a cleaner and organized components just for the Interactions components.

1.- Add the Pick Drop component.

2.- Add the collider and set it as trigger and fill the reference to <Pick Up Area>

3.- Set the GameObject used for the Pick Drop as Ignore raycast. That way the collider will not be recognized as part of the animal.

4.- Add the Trigger proxy component and set the Trigger proxy Layers and Trigger interactions to your needs.

5.- Add a new Input to your character and set the MPickUp.TryPickUpDrop() method to the Input.

6.- Use the Events of the Pick - Drop component to Enable and Disable features on the animal. E.g. When the animal has an object picked, Its necessary to disable the Attack and the Actions Modes, so the animal wont be able to attack, eat, drink or sleep while is holding an object.

Parameters

Pick Up Area

Reference to the Collider used as the Interaction Trigger

Hide Pick Area

When this is set to true the Pick Area will be disabled when the animal picks an object. Limiting the animal to pick any other object until it drops the one it has.

Holder

When an object is picked, it will parented to this transform. Until is dropped

Offsets

It adds some offset to the picked object relative to the Holder position and rotation.

Item

Current Picked item. Set this reference on the editor to start the game holding an object.

Focused Item

This parameter will show the current focused item that is inside the Interaction Trigger.

Events

On Can Pick Item (Boolean)

Is invoked when there's an pickable object inside the interaction area. True when there's an object, false when the object exit the area.

On Item Picked (GameObject)

Is invoked when an item is picked. Uses as parameter the Pickable gameobject

On Item Focused (GameObject)

Is invoked when an item is focused. Uses as parameter the Pickable gameobject

On Picking (int)

Is invoked when the item is picked. Uses as parameter the Pickable ID

On Dropping (int)

Is invoked when the item is dropped. Uses as parameter the Pickable ID

Methods and Properties

Pickable FocusedItem {get;}

Returns the current focused item inside the Trigger

bool Has_Item {get;}

Returns whether the character has an item or not

public Pickable Item {get; set;}

Returns the current hold Item

void TryPickUp()

Tries the pickup logic checking all the correct conditions if the character does not have an pickable.

void TryPickUpDrop()

Tries the pickup logic checking all the correct conditions if the character does not have an pickable, or the Drop item logic when the character is carrying a pickable.

void TryDrop()

Tries the Drop logic when the character is carrying a pickable.

All the Objects that can be picked required to have the component on them.

It needs the component, which uses the OnTrigger Enter OnTrigger Exit callbacks to know which objects enter the Trigger. If this component is not added in the Editor. it will be added at runtime.

All the Objects that can be picked required to have the component on them. Learn more about it on its section.

Some of the properties are handled by the component on the item.

7.- Check on the side of the component what its needed to make the Pick component to work properly.

✊
Pickable
Trigger proxy
Pickable
Pickable
Pickable
Layer set as Items to only recognize gameobjects set with the Layer Item.