Login / Register
Categories Behavior AI

Mobile Pedestrian System

Grid-Based Navigation and Performance

The Mobile Pedestrian System is built upon a grid-based waypoint architecture designed to maintain performance across varying scene dimensions. By utilizing a grid system, the framework ensures that navigation calculations remain efficient even as the environment scales. This architecture supports any platform compatible with the Burst compiler, making it suitable for projects targeting mobile or high-end hardware. The core pathfinding logic allows developers to find the shortest path between two waypoints or direct pedestrians from any location in the scene to a specific destination.

To manage scene density without overtaxing system resources, the package includes a pooling and reutilization system. This mechanism creates the illusion of a crowded environment around the player by recycling a smaller number of pedestrian actors, which helps maintain high frame rates in complex urban scenarios.

Movement and Character Integration

Movement within the system is handled via Apply Root Motion from the character animator, ensuring that walking and turning animations remain grounded and synchronized with the actual displacement of the NPC. The system is built to be flexible with assets, offering support for any humanoid character and any animation set. For immediate implementation, the package includes one production-ready pedestrian character provided by SICS Games and a selection of animations sourced from the Adam project.

Beyond basic movement, the system features both static and dynamic obstacle avoidance. This allows NPCs to navigate around fixed environment objects and other moving entities, reducing clipping and providing a more realistic flow to the crowd.

Defining Pedestrian Types and Regional Density

One of the more granular features of the system is the ability to assign pedestrian types. This allows developers to restrict access to specific areas based on the character’s designation. For instance, a campus area can be configured to only allow NPCs marked as “students” to enter, while other pedestrian types are routed elsewhere. This zoning capability is paired with priority waypoints, which control the spatial distribution of the crowd.

Priority waypoints allow for the adjustment of pedestrian importance across the map. This is particularly useful for simulating realistic urban concentrations, such as spawning higher volumes of pedestrians in a downtown district while keeping the city edges sparsely populated. Additionally, developers can mark specific waypoints to trigger custom events. These events fire when a pedestrian reaches the designated coordinate, enabling the integration of dynamic actions or environmental interactions directly into the navigation flow.

Traffic Integration and Interaction Logic

The system is designed to work alongside vehicular traffic, offering native support for both traffic-light-controlled and uncontrolled street crossings. It includes an independent crossing component that can be integrated with existing vehicle systems, or it can be used as a direct extension of the Mobile Traffic System. This ensures that pedestrians react appropriately to road conditions and signals, rather than simply walking through active traffic.

Developer Tools and Extensibility

Implementation is managed through a suite of custom editor windows designed to streamline the setup of waypoints and pedestrian zones. For developers who require deeper customization, the system provides a simple API for advanced functions and delegates for overriding default behaviors. The package also allows for a vehicle pool inclusion where certain pedestrians are not automatically instantiated by the system, but are instead programmatically triggered by the developer at specific intervals.

The entire codebase is provided and commented, allowing for full transparency in how behaviors are handled. Users can subscribe to various internal events to monitor system activity or build custom logic on top of the existing framework. The system requires Unity 2021.3 LTS or above and is fully compatible with Unity 6.


Mobile Pedestrian System Prev Love/Hate
Mobile Pedestrian System Next Spaceship AI

Leave a Reply