GothicVRProject / GothicVR

Fan project recreating the classic Gothic I and II experience in VR.
GNU General Public License v3.0
26 stars 2 forks source link

Routine waypoint based pathfinding POC #268

Closed BoroBongo closed 10 months ago

BoroBongo commented 10 months ago

This change implements a global access to the FindFastestPath method in the DijkstraPathFinder static class. This allows any part of the code* to find the fastest path between two waypoints using Dijkstra's algorithm.

🚨 * Earliest it can be called is right after the WaynetCreator runs and Waypoint GameObject have been created 🚨

To test

  1. While debugging with breakpoints - recreate steps in this video: Watch the video

Checklist

  1. Make Bloodwyn calculate one of his routines and start patroling ( Hopefully a big difference in immersion )

Scene

Testing

Dependencies

JaXt0r commented 10 months ago

I integrated the path finder into existing WaynetCreator.cs / WaynetHelper.cs.

Still need to test the Dijkstra*Debug.cs method and see if the calculations are still there.

JaXt0r commented 10 months ago

I already tested it and use it in another branch. I merge it now.