NavMeshLink Climbing System
The climbing system enables EnemyCrowd agents to climb walls, ladders, and other vertical surfaces using Unity's native NavMeshLink system. This provides seamless pathfinding integration where agents automatically find and use climbing routes as part of their navigation.
The NavMeshLink-based climbing system provides robust, pathfinding-integrated climbing:
Agents automatically discover climbing routes via NavMesh
No need to disable/enable NavMeshAgent during climbs
Climb direction (up/down) determined by link traversal
Multiple agents can climb simultaneously (World War Z style)
Full GPU Instancer Pro Crowd Animations support
Defines a climbable surface (wall, ladder, etc.)
One per climbable surface
NavMeshLinkTraversalHandler
Central controller for all climbing
NavMeshLinkCrowdAnimationHandler
GPU animation integration (optional)
Step 1: Create a Climbable Surface
Select your wall/ladder GameObject
Add Component → Enemy Masses → Climbing → NavMesh Link Climbable
Right-click the component header → Auto-Detect Dimensions from Collider/Renderer
Press Play to generate NavMeshLinks
Step 2: Add the Central Controller
Create an empty GameObject named ClimbingSystem
Add Component → Enemy Masses → Climbing → NavMesh Link Traversal Handler
(Optional) Add Component → Enemy Masses → Climbing → NavMesh Link Crowd Animation Handler
Open your EnemyCrowd ScriptableObject
Expand Climbing Animations
Assign climb up/down animation clips
Step 4: Bake NavMesh
Open Window → AI → Navigation
Ensure your surfaces are marked as Navigation Static
Play the scene - agents will now automatically climb when their path requires it!
NavMeshLinkClimbable Component
This component creates NavMeshLinks on a climbable surface. Links connect the ground at the wall's base to the ground at the wall's top.
Climb Surface Dimensions
Width of the climbable surface (X axis)
Height of the climbable surface (Y axis)
Vertical offset from pivot to wall base. For center-pivoted objects (Unity cubes), set to -height/2
Forward offset from pivot to wall's front surface. For center-pivoted objects, set to -depth/2
Tip: Right-click the component and select Auto-Detect Dimensions from Collider/Renderer to automatically calculate these values.
NavMesh Links Settings
Create links on both sides of the wall (for walls climbable from either side)
Automatically calculate number of links based on width and spacing
Maximum distance between links (smaller = more links, more agents can climb)
Manual number of links (when Auto Link Count is disabled)
Width of each link (affects agent queuing)
Must match your NavMeshAgent's agent type (0 = Humanoid)
Area type for cost calculation
Allow both climbing up AND down
Higher values make climbing less preferred than walking
Offset from wall base for bottom link points
Offset from wall top for top link points
Search radius for finding NavMesh surface near offset points
Keep Y offset after NavMesh snap (for consistent climb height)
Traversal Settings
Use Height-Based Duration
Calculate climb time from height ÷ speed (recommended)
Units per second when using height-based duration
Fixed climb duration (when height-based is disabled)
Animation Speed
Auto-match animation speed to climb duration
Manual animation speed (when sync is disabled)
Animation curve for vertical movement (ease-in-out recommended)
Controls how agents move during climbing:
Smooth, constant velocity like an elevator
Rhythmic stepping with arm pulls
Only uses the Climb Curve
Human Style Settings:
Number of "pulls" during the climb (2-20)
Pause duration between steps (0 = none, 0.8 = long)
Add variation for natural movement
Horde Mode (Multi-Agent Climbing)
Enable massive simultaneous climbing like World War Z:
Overlapping links at each spot (1 = single-file, 10 = horde)
Horizontal spread for climbers (prevents overlap)
Forward/backward position variation
Random speed differences (0 = uniform, 1 = chaotic)
NavMeshLinkTraversalHandler Component
Central controller that manages all climbing agents. Only one needed per scene.
Reference to EnemyMassesCrowdController (auto-found if empty)
Automatically finish link traversal (recommended: true)
Global speed modifier for all climbing
Horde Mode (Proximity Detection)
Bypass Unity's link occupancy for true simultaneous climbing
Proximity Detection Radius
Distance from link start to trigger climbing
How often to check (lower = faster response, higher CPU)
Delay before agent can climb again (prevents yo-yo)
Mecanim Fallback
Enable Mecanim animator for non-GPU agents
NavMeshLinkCrowdAnimationHandler Component
Integrates climbing with GPU Instancer Pro Crowd Animations. Requires NavMeshLinkTraversalHandler on the same GameObject.
Crossfade speed for animation transitions
Animation Speed Multiplier
Global animation speed modifier
Animation Source
Animations are sourced from each agent's EnemyCrowd.climbingAnimationConfig, allowing different factions to have different climbing animations.
Climbing Animation Config
Configure animations per-faction in the EnemyCrowd ScriptableObject:
Animation Clips
Looping climb animation (going up)
Ground-to-climb transition (optional)
Climb-to-ground transition (optional)
Holding position (optional)
Edge fall animation (optional)
Mecanim Parameters
Dismount Trigger Parameter
Transition time from ground to climbing
Transition time from climbing to ground
Scene Setup Examples
Siege Ladder (Single File)
Zombie Horde Wall (World War Z)
Troubleshooting
Agents Don't Climb
Check NavMesh bake - Ensure surfaces at top and bottom are walkable
Check NavMesh snap radius - Increase if links can't find NavMesh
Verify Agent Type ID - Must match NavMeshAgent settings
Check cost modifier - Very high values may make climbing never preferred
Agents Get Stuck at Link Start
Enable Proximity Detection - In NavMeshLinkTraversalHandler
Increase Link Width - Allow more agents to use each link
Add more Links Per Position - For horde mode
Animation Not Playing
Check ClimbingAnimationConfig - Ensure clips are assigned in EnemyCrowd
Add NavMeshLinkCrowdAnimationHandler - Required for GPU animations
Verify GPU Instancer Pro - Agents need GPUICrowdAnimator
Agents Climbing Through Each Other
Increase Climb Position Spread - Spreads agents horizontally
Increase Climb Depth Spread - Adds forward/back variation
Reduce Links Per Position - For more orderly climbing
Jerky/Stuttering Climb Movement
Adjust Climb Curve - Use smooth ease-in-out
Check Step Pause Strength - Lower values for smoother motion
Verify Speed Multiplier - Very high values may cause issues
RTS/Strategy: 1 link per 3-5 meters of wall width
Horde/Swarm: 1 link per 1-2 meters + high Links Per Position
Proximity Detection
Agent Count
Proximity Check Interval
GPU Instancer Pro handles thousands of climbing agents efficiently
Mecanim fallback has higher CPU cost - use only for non-batched agents