Emerald AI Wiki
  • Home
  • Getting Started
    • Included Demo Scenes
      • Shooter AI Demo
      • Melee Combat Demo
      • Ranged Combat Demo
      • Summoning AI Demo
      • Healing Demo
      • Patrolling Demo
      • Inverse Kinematics Demo
      • Ragdoll Demo
      • Grenade Demo
      • Footsteps Demo
      • Random Waypoints Demo
      • Dynamic Wandering Demo
      • Health Bar Demo
      • Alignment Demo
      • Explosion Damage Demo
      • Sound Detection Demo
      • Fleeing Demo
      • Mouse Movement Demo
      • Companion Demo
      • Equippable Weapon Demo
      • Optimization Demo
      • Working Villager Demo
      • Debugging Demo Scene
    • Getting Started
    • Baking NavMesh
    • Setting up a Player with Emerald AI
    • Upgrading to URP and HDRP
    • Difference Between Emerald AI 3.0 and Emerald AI 2025
  • Help
    • Solutions to Possible Issues
    • Using the Wiki Search Tool
    • Release Notes
    • Support
  • Emerald Components (Required)
    • Animation Component
      • Creating an Animation Profile
      • Opening the Animation Viewer
    • Behaviors Component
      • Creating an Aggressive AI
      • Creating a Companion AI
      • Creating a Cautious AI
      • Creating a Coward AI
      • Creating a Passive AI
      • Creating a Pet AI
      • Creating Custom AI Behaviors
    • Combat Component
      • Assigning Combat Actions
      • Assigning Attack Transforms
      • Assigning Ability Objects
      • Weapon Type Amounts
    • Detection Component
      • Applying a Head Transform
      • Setting up the Detection Layers and Player Tag
      • Faction Relations
    • Movement Component
      • Using the Align AI Settings
      • Using the Dynamic Wander Type
      • Using the Waypoints Wander Type
      • Using the Stationary Wander Type
      • Using the Destination Wander Type
    • Health Component
      • Setting up an AI's Health
      • Setting up an AI's Hit Effects
    • Sounds Component
      • Creating an AI's Sound Profile
  • Emerald Components (Optional)
    • Adding and Removing Optional Components
    • Cover Component
      • Applying the Cover Component
      • Setting up the Cover Component
      • Setting up Cover Nodes
    • Debugger Component
      • Applying the Debugger Component
      • Drawing an AI's Path
      • Drawing an AI's Destination
      • Drawing an AI's Line of Sight
      • Drawing an AI's Undetected Targets Line
      • Debug Log Targets
      • Debug Log Current Obstruction
    • Decal Component
      • Applying the Decals Component
      • Setting up the Decals Component
    • Events Component
      • Applying the Events Component
      • Creating an Event Through the Editor
      • Creating an Event Through Code
    • Footsteps Component
      • Applying the Footsteps Component
      • Setting up the Footsteps Component
    • Inverse Kinematics Component
      • Applying the IK Component
      • Creating an Animation Rig and Multi-Aim Constraint
      • More Info on the Animation Rigging Package
    • Items Component
      • Applying the Items Component
      • Creating Equippable Weapons
    • Location Based Damage Component
      • Applying the LBD Component
      • Assigning Colliders to the LBD Component
      • Damaging the LBD Component
    • Optimization Component
      • Applying the Optimization Component
      • Setting up the Optimization Component
    • Sound Detector Component
      • Applying the Sound Detector Component
      • Understanding the Sound Detector Settings
      • Using an Attract Modifier
    • Target Position Modifier Component
      • Setting up the TPM Component on an AI
      • Setting up the TPM Component on a Player
    • UI Component
      • Applying the UI Component
      • Setting up the UI Component
    • Weapon Collision Component
      • Applying the Weapon Collision Component
      • Setting up the Weapon Collision Component
  • API
    • Accessing the EmeraldAPI Script
    • Available API
      • Movement API
      • Combat API
      • Faction API
      • Sound API
      • Animation API
      • UI API
      • Detection API
      • Behaviors API
      • Health API
      • Items API
    • Damaging an AI
    • Damaging a Custom Character Controller
    • Using the Built-in Object Pooling
  • Emerald Profiles & Objects
    • Ability Object
      • Bullet Projectile Ability
      • Grenade Ability
      • General Projectile Ability
      • Ground Projectile Ability
      • Aerial Projectile Ability
      • Arrow Projectile Ability
      • Melee Ability
      • Teleport Ability
      • Summon Ability
      • Healing Ability
      • Area of Effect Ability
      • The Collider Module
      • The Damage Module
    • Combat Action Object
      • Blocking Combat Action
      • Dodge Combat Action
      • Strafe Combat Action
      • Random Movement Combat Action
      • Switch Target Combat Action
      • Creating Custom Combat Actions Through Code
    • Reaction Object
      • Creating a Reaction Object
      • Included Reaction Objects
    • Animation Profile
      • Creating an Animator Controller
      • Applying Animations
      • Regenerate Animator Controllers
      • Copying Animation Profiles
    • Sound Profile
      • Creating an AI's Sound Profile
      • Setting up Footstep Sounds
      • Setting up Attack Sounds
      • Setting up Warning Sounds
      • Setting up Death Sounds
    • Waypoint Profile
    • Footstep Surface Object
      • Creating a new Footstep Surface Object
      • Setting up a Footstep Surface Object
  • Emerald Managers
    • Setup Manager
      • Setting up an AI with the Setup Manager
    • AI Duplicator Manager
      • Duplicating an AI
    • Animation Viewer Manager
      • Opening the Animation Viewer
      • Previewing Animations
      • Creating and Applying Animation Events
      • Creating Attack Animation Events
    • Faction Manager
      • Modifying Factions Through the Faction Manager
    • Combat Text Manager
      • Adjusting the Combat Text Settings
      • Accessing the Combat Text System Through Code
  • Integrations
    • Integrations
      • Final IK
      • Invector
      • FPS Engine
      • Dialogue System
      • Quest Machine
      • Love/Hate
Powered by GitBook
On this page
  • Setting up a Cover Node
  • How Cover Nodes Work
  • Cover Node Conditions
  • Cover Type Arrow Indicators
  • Crouch and Peak
  • Crouch Once
  • Stand

Was this helpful?

  1. Emerald Components (Optional)
  2. Cover Component

Setting up Cover Nodes

Last updated 4 months ago

Was this helpful?

Note: Emerald AI 2024 version 1.3.0 or higher is required to use this component.

Setting up a Cover Node

Cover Nodes are position points that the Cover Component can look for. These are searched for based on the user set Cover Node LayerMask within the Cover Component.

To create a Cover Node, you can right click within the Hierarchy go to Emerald AI>Create Cover Node or at the top of Unity go to GameObject>Emerald AI>Create Cover Node. This will create a new Cover Node for you to position in your scene. As many Cover Nodes as needed can be created and used.

How Cover Nodes Work

Important: If there are not enough Cover Nodes, or an AI cannot find an unoccupied Cover Node, an AI will automatically generate a position within line of sight of its current target. Once a Cover Node becomes available, an AI will move to it to take cover.

Important: When the option Get Line Of Sight Position is enabled, an AI can automatically generate a new position within line of sight of its current target, given its target is currently obstructed. This can be helpful if the object providing cover will not give the AI a clear line of sight or if you want AI to feel more dynamic and unpredictable. If you do not want AI using this, it can be disabled.

Cover Nodes work by giving an AI a position to move to and attack from. This overrides an AI's default behavior where it simply attacks and chases its current target.

The white forward facing arrow on the Cover Node is used to control the intended direction for the cover. This based on the forward direction of the Cover Node.

Cover Node Conditions

An AI will pick a Cover Node based on the following conditions:

  • The Cover Node must be unoccupied.

  • The Cover Node must be within certain forward facing angle limits of all currently detected targets.

  • The Cover Node must be further than the Min Cover Distance (set through the Cover Component) from all enemy targets.

  • Any enemy occupied Cover Node must be further than the Min Cover Distance (set through the Cover Component).

  • The Cover Node's forward direction must be within the node's Cover Angle Limit to all enemy targets (set through each Cover Node).

  • The distance to a Cover Node does not exceed the Max Travel Distance (set through the Cover Component).

These conditions ensure that AI intelligently and strategically pick Cover Nodes.

Cover Type Arrow Indicators

The Arrow Indicators are different depending on the selected Cover Type. This helps make it easier to determine what each Cover Node does without having to look at the settings directly. You can also change the color of this arrow to further customize and differentiate the nodes.

Important: Some of the settings mentioned below are based on an AI's Cover Component.

Crouch and Peak

Allows an AI to crouch for the duration of its generated Hide Seconds and stand from this cover point. The amount of peaks is based on its generated Peak Times. During each peak, it will attack for the duration of its generated Attack Seconds.

Crouch Once

Allows an AI to crouch once for the duration of its generated Hide Seconds and stand from this cover point. While standing, it will attack for the duration of its generated Attack Seconds.

Stand

Allows an AI to stand continuously from this cover point. While standing, it will attack for the duration of its generated Attack Seconds.

You will want to position your Cover Node behind an object with a collider on it. You can do so for both direction if desired. It is recommended that the object have a or are to ensure an AI navigates around the object. The Cover Node should be positioned just above the ground.

NavMesh Obstacle
baked with NavMesh
The Cover Node Component
Crouch and Peak
Crouch Once
Stand