I’m looking at joining pre baked recast graphs at runtime. I essentially have terrain tile pieces I load/unload from the scene at runtime and I need to figure out a way to be able to path find on my procedural world.
I tried the procedural example with the grid graph but there’s a few problems:
-
For some reason the pathfinding messes up whenever I try to run away from my AI (it doesn’t understand how to chase me properly). Without a visualization for this out of the box, it’s hard to tell what’s going on with it exactly, but the problem isn’t present with a baked recast/gridgraph, just the procedural graph mover.
-
I require detailed indoor areas in my massive outdoor levels. a Layered GridGraph version of the procedural mover script would be wonderful (if I could figure out the problem listed above).
So here’s my issue: The graph needs to be able to handle infinite worlds. I’m looking to build procedural outdoor levels using pre-made piece variations but since what piece connects to what other piece is randomly determined, I cannot just pre bake one big graph. I can pre bake multiple small graphs since each chunk is in a different Unity scene but I’m stumped as to how to merge multiple small graphs into one big one correctly.
So here are my questions:
-
Any chance we’ll get a Layered Grid Mover script for us Pro users? The issue I had sounds like it could be fixable and that would probably be easier to figure out than creating my own graph frankestein monster as below.
-
If there’s no chance for a layered grid graph mover script, how can I go about joining recast graphs together at runtime, if they are being imported from their own Unity scenes? IE: I have Scenes 1, 2 and 3 created and each has their own recast graph pre-baked. I load scene 3 into scene 1 at runtime, how would I go about joining the edges of these two graphs so that the AI can chase me from one graph and into the other in the case that AI chases me to the edge of its graph and into the next?
-
If I have to go with Recast graphs, is there a way for me to add new geometry to them and have my units path find on them? IE: I craft a building with two floors in an empty patch of terrain, and graph updates with the building’s interior. I know you can subtract walkability from a recast graph, but can you add new walkable areas to it somehow at runtime? Like a 2 story building with walkable upstairs areas? Can I maybe just do a scan on just that tile in a background thread or something?
Thanks in advance!