Jump to content

Gaia - Terrain and Water - NavMesh generation ?


xexuxjy
Go to solution Solved by xexuxjy,

Recommended Posts

Apologies if this has been covered, but is it possible to generate a standard terrain, set it to be on say a Ground layer, then set the generated water to be on a Water layer, then add a NavMeshSurface component to the terrain and set up the baking of a NavMesh so that it only includes the Ground layer, and therefore only the areas of the terrain that are above the water mesh? Basically stopping things from walking across water sections.

I realise that doing things like raising or lowering the sea level would invalidate the NavMesh but as it stands I don't seem to be able to generate an appropriate NavMesh , possibly due to the runtime generated water and infinite terrain options.

If this isn't possible, then do you have any advice as to best practise in allowing characters to avoid water while navigating the world?

 

Thanks.

Link to comment
Share on other sites

4 hours ago, xexuxjy said:

I don't seem to be able to generate an appropriate NavMesh

I recommend using Unity's other nav mesh (why they havent put it in - I have no idea). 
https://github.com/Unity-Technologies/NavMeshComponents

This one is 1000 time better than the nav mesh in Unity and its only available on Git. 

As far as changing the layers yes you could if you wanted to. 
Secondly what I typically do is the Game developer move ( use plane game objects - with no mesh render). 

Really this is up to you how you want to handle it. 

Link to comment
Share on other sites

  • Solution

Thanks, I am using the new system from Git (which I agree seems much cleaner), I think that (unsurprisingly) it was user error.

What I had to do in case anyone's suffering from a similar problem :

Create a Gaia terrain , put it on the Ground layer and add a NavMeshSurface surface component that collects all objects , has a default area of walkable and includes both the Ground and Water layers in it's layer mask.

Add a NavMeshModifier to the water object, sets it's area type to non walkable, and set it to override area.

Bake the NavMeshSurface component on the terrain object. (can take a while depending on voxel size)

That gave me pretty much the result I wanted.

Thanks again and just wanted to comment how on how nicely Gaia has let me quickly generate some really great terrains.

  • Like 1
Link to comment
Share on other sites

9 hours ago, xexuxjy said:

Thanks, I am using the new system from Git (which I agree seems much cleaner), I think that (unsurprisingly) it was user error.

What I had to do in case anyone's suffering from a similar problem :

Create a Gaia terrain , put it on the Ground layer and add a NavMeshSurface surface component that collects all objects , has a default area of walkable and includes both the Ground and Water layers in it's layer mask.

Add a NavMeshModifier to the water object, sets it's area type to non walkable, and set it to override area.

Bake the NavMeshSurface component on the terrain object. (can take a while depending on voxel size)

That gave me pretty much the result I wanted.

Thanks again and just wanted to comment how on how nicely Gaia has let me quickly generate some really great terrains.

Thats great to hear you got it fixed! 
 

Link to comment
Share on other sites

  • 1 month later...

Welcome. I read the post and my question would be that I can use the Nav Mesh web management application downloaded from Git - Hub by simply inserting it into Assets? Thank you for the answer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...