Jump to content

#1
shadmar

shadmar
  • Members
  • 1,844 posts
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
Asus G750JX - 16GB - i7 - Nvidia GTX 770M 4GB - Leadwerks2 and Leadwerks3
Community Wiki : http://leadwerks.wikidot.com/

#2
Rick

Rick
  • Members
  • 7,017 posts
+1
Posted Image Posted ImagePosted ImagePosted ImagePosted Image

#3
Josh Klint

Josh Klint
  • Staff
  • 11,091 posts
Why not just discard triangles below the water height?

#4
gamecreator

gamecreator
  • Members
  • 1,858 posts
That's awesome if we can do that but where's the function for it?

#5
Rick

Rick
  • Members
  • 7,017 posts
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 Image Posted ImagePosted ImagePosted ImagePosted Image

#6
gamecreator

gamecreator
  • Members
  • 1,858 posts
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.

#7
blueapples

blueapples
  • Members
  • 70 posts
It'd probably be better to just change the AI script so it knows it can't swim?

#8
reepblue

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

I made this with Leadwerks Game Engine!
Vectronic - LEX Template - Darkness Awaits Template - Rolly: The Rollable Ball That Rolls Too Much
If you like my work, consider supporting me on Patreon!

#9
Rick

Rick
  • Members
  • 7,017 posts
Yes, reepblue that is the workaround we will be using but it's far from ideal. This is the suggestion forum.
Posted Image Posted ImagePosted ImagePosted ImagePosted Image

#10
reepblue

reepblue
  • Members
  • 469 posts
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...
I made this with Leadwerks Game Engine!
Vectronic - LEX Template - Darkness Awaits Template - Rolly: The Rollable Ball That Rolls Too Much
If you like my work, consider supporting me on Patreon!

#11
Rick

Rick
  • Members
  • 7,017 posts
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 Image Posted ImagePosted ImagePosted ImagePosted Image

#12
gamecreator

gamecreator
  • Members
  • 1,858 posts
Torus?

#13
Josh Klint

Josh Klint
  • Staff
  • 11,091 posts
I would recommend a tube shape, but we do literally have a CSG doughnut shape available. :)

#14
Rick

Rick
  • Members
  • 7,017 posts
I don't get it.
Posted Image Posted ImagePosted ImagePosted ImagePosted Image

#15
Crazycarpet

Crazycarpet
  • Members
  • 136 posts
Is a torus not a doughnut shape? Pretty sure it is.

#16
Rick

Rick
  • Members
  • 7,017 posts
He says it already has that but I don't see it.
Posted Image Posted ImagePosted ImagePosted ImagePosted Image

#17
SGB

SGB
  • Members
  • 192 posts
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.
---
Scott

Using LW Release Version, Windows 7 Ultimate 64 bit/Core I7-2700K @ 4312mhz/24G RAM/Radeon R9-280X 3G

#18
Rick

Rick
  • Members
  • 7,017 posts
Ah it's under compound! ty sir
Posted Image Posted ImagePosted ImagePosted ImagePosted Image

#19
shadmar

shadmar
  • Members
  • 1,844 posts
And you just need it when you click Build Navmesh, after you can delete it.
Asus G750JX - 16GB - i7 - Nvidia GTX 770M 4GB - Leadwerks2 and Leadwerks3
Community Wiki : http://leadwerks.wikidot.com/

#20
gamecreator

gamecreator
  • Members
  • 1,858 posts
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?