Swarm AI – Avoidance & Steering adds predictive local collision avoidance and steering behaviors for smooth, natural crowd movement.Swarm AI - Avoidance & Steering is a performance-focused local movement layer for crowd, swarm, and formation simulations in Unity. It handles the local side of mass movement: keeping agents responsive, avoiding collisions, reacting to density, and producing motion that feels organic instead of robotic.This module can be used standalone, or combined with Swarm Core and Flow Fields to build a complete movement stack: global direction, local collision resolution, terrain-aware movement, and natural steering.What It’s ForCity crowds, top-down games, RTS units, simulations, factories, and creature swarmsDense agent scenes where per-agent pathfinding becomes too heavyGround, terrain-following, and flying agentsMovement systems that need smooth local decisions under loadKey FeaturesCollision AvoidancePredictive local collision avoidance for agent-agent interactionsORCA 2D for reciprocal planar avoidanceORCA 3D-style avoidance for flying agentsContinuum crowd avoidance for smooth density-based motionDynamic obstacle avoidance for moving blockersObstacle and cost-field avoidance integrationsSteering BehavioursSeek, flee, arrive, follow, pursue, wander, orbit, density, formation, boids, separation, cohesion, and alignment behavioursTunable weights and prioritiesAgent priority support for neighbor interactionsAvoidance urgency reporting so steering can yield under collision pressureVertical movement preservation for flying agentsDesigned To IntegrateWorks standalone as a local steering and avoidance layerIntegrates with Swarm Core agents through adaptersIntegrates with Flow Fields for global-plus-local navigationSupports debug visualization for steering, avoidance, obstacle fields, and cost gradientsIncludes Burst/job-compatible ORCA solver groundwork for optimized workflowsIf you want mass movement that looks good, scales well, and avoids heavy per-agent pathfinding, this module is built for that.EngineUnity compatibleURP, HDRP, and Built-in Render Pipeline supportedNo render-pipeline-specific runtime dependencyPlatformsPC, console, and mobilePerformance depends on agent count, neighbor radius, update rate, and enabled modulesCore ApproachLocal avoidance and steering layer for many-agent movementCan run standalone or as part of a larger swarm navigation stackDesigned to combine global direction input with local collision resolutionAlgorithms / OptionsPredictive agent-agent avoidanceORCA 2D reciprocal collision avoidanceORCA 3D-style avoidance for flying agentsContinuum-style crowd avoidanceDynamic obstacle avoidanceCost-field and obstacle-field avoidanceWeight- and priority-based steering compositionSteeringSeek, Flee, Arrive, Follow, Pursue, Wander, OrbitSeparation, Cohesion, AlignmentBoids-style combined steeringFormation steeringDensity steeringVelocity blending and smoothingVertical movement preservation for flying agentsIntegrationStandalone usage supportedOptional integration with Swarm CoreOptional integration with Flow FieldsAdapter-based IAvoidanceAgent supportCompatible with ground, terrain-following, and flying agentsDebuggingDebug visualization for steering vectorsAvoidance intent and velocity direction visualizationObstacle field and cost gradient debug supportHelpful for tuning neighbor radius, weights, and prioritiesPerformance NotesIntended for large groups of agentsNeighbor sampling radius, max neighbors, and update rate strongly affect performanceORCA 2D solver includes bounded solve behavior to reduce worst-case spikesBurst/job-compatible ORCA solver groundwork included for optimized workflowsUse simpler modules or lower update rates for very large mobile scenes.AI tools were used to assist with code structure, documentation drafting, and implementation review. Final design decisions, testing, tuning, and asset integration were manually reviewed and refined.




