Forum rules - please read before posting.

NavMesh or Unity Navigation created at runtime? (Randomly generated navmesh)

So I'm making a game here, loving using AdventureCreator. My problem is that I am to the point in my game's production that I now need to make the levels randomly generated. I didn't really think this through when I made my game using AdventureCreator haha...... anyway, I think my question pretty much sums it up. Is there a way that I can bake the NavMesh at runtime? So that the characters don't actually know what their pathfinding options are until after the game has started. You know what I mean :P... and if this isn't a possibility currently (I'm seriously open to anything, I can try integrating other pathfinding methods if you know of any that might work (I haven't found any that I can successfully get to work with AC)), is it at all possible that this option could be featured in a future update of AC? I don't know how complicated this whole thing might be, but it never hurts to ask, right? Thank you very much for your time.

Comments

  • Randomly-generated levels aren't a part of traditional adventure games, which is why AC doesn't really cater for them.  However, you should be able to use a script-created NavMesh at runtime - provided you can programatically create it when the scene begins.

    Making mesh through scripts is beyond the scope of this forum, but there are a lot of resources on the net (this is a good starting point).  Once you've gotten your mesh, simply assign it to your NavMesh's Mesh Collider, and AC will be able to make use of it.
  • Thank you very much for the reply! Within a week I'm actually going to be purchasing an awesome asset for my game that randomly generates something else (I'm going a different direction now), and luckily this asset actually has a pathfinding system built into it. I have no doubt I can get it to work with AC, writing my own pathfinding system was the problem beforehand. Thanks again!
  • @ILoFoSho, might I ask what the name of this asset is? :)
  • Of course! You've probably heard of it, it's called TerraVol. It uses an A* Pathfinding system. In its online demo you can set a destination using the "I" key and then have it trace a path back to that point using the "I" key again, and that's after it's randomly generated a terrain, so I know it works at runtime. Here's the link to its forum:

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.