Jump to content

Recommended Posts

Posted

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

  • Upvote 2

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Posted

Why not just discard triangles below the water height?

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

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.

Posted

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.

Posted

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...

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Posted

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.

Posted

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

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

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.

  • Upvote 1

---

Scott

 

Using Windows 7 Ultimate 64 bit/Core I7-2700K @ 4312mhz/24G RAM/Nvidia GTX 1060

  • 5 months later...
Posted

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.

Posted

@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.

Posted

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

I considered doing this too but didn't try it yet. Knowing it worked for you, I'll give it a shot.

 

Still would love to know the code Josh suggested though; how to access and properly remove navmesh triangles. And bonus points if we can put the triangles back (didn't we have an issue with dynamic door navigation that that would solve?).

Posted

I considered doing this too but didn't try it yet. Knowing it worked for you, I'll give it a shot.

 

Still would love to know the code Josh suggested though; how to access and properly remove navmesh triangles. And bonus points if we can put the triangles back (didn't we have an issue with dynamic door navigation that that would solve?).

A quick test reveals the following show that this trick still works.

 

1. Place a box with its bottom on the ocean line.

post-45-0-37451800-1484162370.jpg

 

2. Make the box higher than any mountain, otherwise the terrain will create a navmesh going from the terrain to the top of the box.

post-45-0-83091000-1484162365_thumb.jpg

 

 

3. Generate navmesh and tada: shoreline. note that you still have a navmesh on the ocean floor, but the agents can't reach it.

post-45-0-72669700-1484162362_thumb.jpg

  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...