Water under my terrain

69 views
Skip to first unread message

PaulS

unread,
Feb 11, 2023, 12:33:03 PM2/11/23
to recastnavigation
Hi, can someone please help me?  I'm trying to find the simplest solution to this.  All of my terrains are surrounded by a huge ocean plane that is a different area than the ground.  This is so certain things (like water elementals) can walk on the water.  But I don't want any of the water polygons to be passable if they are underneath my terrain.  It's causing some strange pathfinding issues on the land above once in a while.  I know I could come up with some code to do that check after I build my navmesh and change those polys to not walkable (then re-save) but is there a way in recast to accomplish this?

Thanks!
Paul

Graham Pentheny

unread,
Mar 15, 2023, 10:05:33 PM3/15/23
to recastnavigation
Hey Paul.  Hard to really know what the proper solution is without some more context/screenshots but here's a few ideas:
* Adjust your rcConfig::ch value to prevent overlapping terrain and water navmesh geometry in those areas
* Build a separate navmesh specifically for water elementals.  That would allow Recast to consider water and land polygons together and properly generate navmesh polygons at the area boundaries.
* Prevent recast from generating navmesh data in specific areas by marking them as unworkable in the geometry input step, or remove specific polygons from the final navmesh manually.

Hope that helps.

Graham

Reply all
Reply to author
Forward
0 new messages