I have a world sized 20000x20000. I managed to get the entire world loaded in the editor, and run a 90k set of Recast Graph tiles, took a fair amount of time. So now I have a complete graph, I have another issue to deal with.
As my player is moving around the world, new world tiles are moved into and out of memory. Since the entire world isn’t loaded at any given moment, and because large float values cause issues in Unity, I decided to load sections of my world around the Unity origin. So as the player moves, it seems to them they are moving across the world. They move across a tile, and when they get close to a tile edge, another tile is loaded, the far tile behind them is unloaded, and the entire world is shifted so that the player is again close to 0x0.
I understand that moving the graph is slow, but that I might not need to do that. I could query into the graph to get a path, and then somehow apply that path after having been transformed to the world position as it currently stands (the world is moving around the origin.)
While looking over the forum for information about doing this, I did find a few posts that had some leads. However, I was never able to nail down a solution. The closest I got was How can I attach my grid graph to my map and move them together? (Unity and C#), but the two links that Aron had didn’t work for me.
Can anyone share some guidance on how to transform a path?
I am using a Seeker and AI Path script, along with Opsive.UltimateCharacterController.Integrations.AstarPathfindingProject.AStarAIAgentMovement