What's New in Tactical AI 2.0

Upgrade Guide

⚠️ Important: Backup your project before upgrading. Namespace changed from MaharajaStudio.HidingSystem to MaharajaStudio.TacticalAI.

New Providers (V2)

Advance Cover Provider

`AdvanceCoverProviderSO` facilitates forward movement ("leapfrogging") towards a target.

How It Works

Generates points in a cone towards the target. Unlike simple movement, it validates that the destination actually has cover (walls/obstacles) nearby using Physics.CheckSphere.

Parameters
  • Advance Distance: Max forward search distance.
  • Search Angle: Width of the advancement cone.

Choke Point Provider

`ChokePointProviderSO` identifies constricted areas like hallways, bridges, and doorways for ambushes.

How It Works

Scans for points where geometry constricts on opposing sides (Left/Right or Forward/Back). Good for grenade targets or blocking paths.

Corner Edge Provider

`CornerEdgeProviderSO` scans for vertical edges to allow "Tactical Peeking".

How It Works

Performs a high-res radial scan to detect depth discontinuities (corners). Places points slightly behind the edge.

Performance
Heavy - Uses many raycasts. Use selectively.

Flank Point Provider

`FlankPointProviderSO` generates points at the sides or rear of a target.

How It Works

Calculates arc offsets from the target's forward vector. Alternates between Left/Right flanks.

Parameters
  • Min Flank Angle: 90=Side, 180=Rear.

Pincer Formation Provider

`PincerFormationProviderSO` coordinates squad encirclement.

How It Works

Calculates the average direction of all allies relative to the target, then finds the "empty" side (inverse vector) to place new agents, naturally surrounding the enemy.

Room Clearance Provider

`RoomClearanceProviderSO` generates a "pie slice" arc for CQB.

How It Works

Detects a doorway/corner and generates a fan of points to allow agents to "slice the pie" methodically.

Squad Formation Provider

`SquadFormationProviderSO` creates strict shapes (Wedge, Line, V) relative to a leader.

How It Works

Queries the SquadCoordinator for the agent's slot index and places them at a fixed offset from the leader.

Vantage Point Provider

`VantagePointProviderSO` seeks high ground.

How It Works

Biases NavMesh sampling upwards and validates that the point is significantly higher than the agent. Good for Snipers.

New Scorers (V2)

Aggressive Line of Sight

Offensive. Rewards spots with a clear line of fire to the target. Unlike visibility scorers (which hide you), this one ensures you can shoot back.

Player Path Prediction

Offensive. Aims for where the player will be in X seconds based on their velocity, rather than where they are now.

High Ground

Offensive. Rewards being vertically higher than the target. Essential for King of the Hill or Snipers.

Rear Attack Bonus

Offensive. Rewards spots located behind the target's back (Dot Product check).

Push Forward

Offensive. Rewards spots that are physically closer to the target than the current position. Forces "Rusher" behavior.

Zone Control

Offensive. Rewards matching Line of Sight to a specific Objective ID (e.g., guarding a flag).

Bullet Penetration (Material Thickness)

Defensive. Raycasts through the cover object to measure its thickness. Penalizes thin cover (wood) and prefers thick cover (concrete).

Heavy

Fatal Funnel

Defensive. Penalizes standing in narrow doorways or corridors where there is no room to dodge.

Escape Route

Defensive. Raycasts behind the cover to ensure there is a valid path for further retreat (avoids dead-ends).

Player Gaze

Defensive. Penalizes spots that the player is currently looking directly at (Foveal vision).

Wall Hugging

Defensive. Encourages staying physically close to walls. Prevents "Open Field Syndrome" where AI stands in the open.

Skylining

Defensive. Checks if the agent is silhouetted against the sky (no background geometry).

Exposure Volume

Defensive. Casts rays in 360 degrees to measure how "open" the area is. Prefers tight spaces over open fields.

Cover Cluster

Defensive. Rewards spots that have other cover objects nearby (backup options).

Smart Path Safety

Defensive. Advanced pathfinding that looks for "Detours" if the direct path is dangerous. Calculates safe flanking routes.

Heavy

Squad Reservation

Squad. Essential Prevents two agents from picking the same spot. Checks the SquadCoordinator registry.

Line of Fire Safety

Squad. Prevents agents from standing in the crossfire between an ally and the target.

Muzzle Discipline

Squad. Prevents agents from crossing directly in front of an ally's gun, even if not firing.

Squad Separation

Squad. Ensures a minimum physical distance (e.g., 3m) between agents to prevent bunching.

Sector Watch

Squad. Rewards facing directions that allies are not watching. Automates "Rear Security".

Repetition Penalty

Utility. Penalizes spots the agent has recently used. Forces rotation/movement.

Light Probe (Shadows)

Utility. Uses Unity Light Probes to detect darkness. Good for Stealth.

Casualty Aversion

Utility. Creates a "Fear Map" around recent ally death locations. Agents avoid "cursed" ground.

Audio Stimulus

Utility. Pulls agents towards sounds (Gunshots, Footsteps) in the StimulusRegistry.

Stalemate Breaker

Utility. If an agent sits in cover too long ("Boredom"), this scorer aggressively rewards flanking moves to force action.

Ready to use these tools?

Go to Main Docs