I have a system that loads scenes with terrain’s within them with async loading once the player reaches a certain distance from the targeted area to load.
My goal: traverse multiple scenes of terrain with a water object between them that the player resides in 3d space with 256 by 256 terrain width size, then modify Astar runtime data while loading new data points with removing old data points as the player traverses.
Player and AI both use Astar pathfinding.
I understand that I can save files that are generated with pathfinding; however, I don’t know how to combine them at runtime then unload files that are not needed anymore so that A star will be satisfied.
Can someone help a novice like me understand on how to bridge these files together at runtime?
General idea of script sudo code that I need help understanding:
Once terrain async is loaded
1.) Run function for loop injecting new file data into Astar //from newly loaded area
1.A) Run an Update for Astar with existing data
2.) Run function for loop removing old file data into Astar //from previous loaded areas
2.A) Run an Update for Astar with existing data