Pedestrian pathfinding part 2: Collision detection

Pedestrian pathfinding part 2: Collision detection

Unity3D Video Game Development MiniTrue

I spent much time during the last weeks in programming the pedestrian pathfinding. After investing much work into the buggy implementation of evasion pathfinding algorithm and many hours of debugging now it seems to work.

Instead of the vehicle implementation (using Dijkstra pathfinding) for the pedestrian I use a jumpoint-pathfinding and a grid map.

To prevent pedestrians from colliding with aother pedestrian, they mark their map pos as blocked (drawn red in the screenshot).

pathfinding

To synchronize between the vehicles and the pedestrians the vehicles project their actual position onto the pedestrian map (drawn black in the the screenshot). So no pedestrian can enter a field, a vehicle is driving across.

Only for exceptional cases (when the blocking of the map has not prevented a collision) there is a front collider attached to each pedestrian.

pathfinding