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

Categories: Unity3D , Video Game Development , MiniTrue

Tags: Collider , Collision Detection , Unity3d , Pathfinding , Artificial Intelligence

QR-Code dieses Beitrags


Dieser Blog-Artikel beinhaltet keine bezahlten Produktplatzierungen.
Bei Affiliate-Links oder Rabatt-Codes entstehen für den Leser keine Kosten oder Nachteile. Bei einem Kauf über diesen Link/mit diesem Code erhält der Betreiber eine prozentuale Provision und/oder gewährt dem Käufer einen Rabatt in angegebener Höhe.