shadmar

Paint area of navmesh

28 posts in this topic

If I have a island with water all around, my AI would run into the ocean.

It would be great if we could restrict navmesh to the area painted on the terrain, like a color or something

2

Share this post


Link to post

I'd be careful with that as you might have walkable ares to another close island that has waist high water only. I understand that's probably easier for you to do but it'll limit us some and won't be as flexible for the users.

0

Share this post


Link to post

We can always throw more caveats at Josh but the more you throw, the less likely it will be that someone else will also come across that specific scenario. If waist high water is walkable, I'd test for water height minus the waist height instead.

0

Share this post


Link to post

  • Make boxes around island with nav obstacle enabled.
  • Build navmesh
  • Hide boxes.
  • ???
  • AI will not go in water because there is no navmesh.

1

Share this post


Link to post

Yes, reepblue that is the workaround we will be using but it's far from ideal. This is the suggestion forum.

1

Share this post


Link to post

Actually, Source uses brushes to prevent navmesh building I'm sure you can just make an invisible brush with no collision, and set the obstacle mode to true and it'll work that way. This way, you don't need to hide anything. Just wish the brushes didn't have to be invisible as my old solution of using a transparent texture, then making it invisible during run time conflicts with GI building.

 

But, I agree, there should be a height limit in the navmesh builder or something. So I'm not saying that this isn't a bad suggestion, but it's not like there isn't other ways around this...

0

Share this post


Link to post

Given we have no donut csg trying to do this with the available csg brushes we have with a circle island would be a nightmare to work with. How would you do it? About 50 boxes? Give is a donut and then we can make a giant one around the island.

0

Share this post


Link to post

I would recommend a tube shape, but we do literally have a CSG doughnut shape available. :)

0

Share this post


Link to post

Menu item Create>Compound>Torus. There's also arch and tube. I'm using the beta though so I don't know if it's in the release version.

1

Share this post


Link to post

And you just need it when you click Build Navmesh, after you can delete it.

0

Share this post


Link to post

I just came across this issue too and I think discarding navmesh triangles would work for me (as Josh mentioned above). Any chance someone has some code to show how this could be done?

0

Share this post


Link to post

can't you program the ai to not go into the water.

0

Share this post


Link to post

You have to know where the water is to do this and since the path finding is built into the leadwerks the only way to do that is to block the water with something.

0

Share this post


Link to post

you can detect water height, it's the same value around the island.

0

Share this post


Link to post

I had to do this do for a strategy game with multiple islands.

  1. Make 1 giant csg box at the same height of the water going all the way down
  2. Check the navmesh obstacle option

1

Share this post


Link to post

@jen the navigation that comes in the editor doesn't care about water height. It only cares about is the area walkable. One way would be to have very steep drop offs of terrain in the water I suppose.

0

Share this post


Link to post

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!


Create Your Account

Sign in

Already have an account? Sign in here.


Sign In Now