Tile Mesh Export not Including Off-Mesh Connections

76 views
Skip to first unread message

richard.g...@gmail.com

unread,
Dec 6, 2022, 11:21:04 AM12/6/22
to recastnavigation
Hi everyone,

I'm writing an AI for an old HL1 mod which is using the Recast and Detour libraries for pathfinding. I am using the RecastDemo utility to load in a map, build the nav mesh, and then export it for use by the AI.

When I was using the SoloMesh example as a base, I was able to export the nav mesh data from the RecastDemo application and use it in my AI just fine, off-mesh connections worked. However, since switching to the TempObstacles example so I can make use of temporary obstacles and (eventually) moving obstacles, it is no longer exporting the off-mesh connection data correctly, as my AI does not make use of any off-mesh connections.

I noticed in the save code there is nothing to do with off-mesh connections which probably explains why it's not working: none of the tile caches contain any off-mesh connection data.

Does anyone know how I'm supposed to export and import the nav mesh data so that I can make use of off-mesh connections? Currently I'm just using the exact same export and load code as the TempObstacles example.

Graham Pentheny

unread,
Mar 15, 2023, 10:57:16 PM3/15/23
to recastnavigation
The export/import code in RecastDemo is likely missing a ton of features and somewhat misleading.  Saving and loading navmesh data is more often than not very game-specific, as most games don't simply deal with flat files on disk and instead use pak files and the like.  If it doesn't already I think we should fix the RecastDemo implementation to properly serialize and deserialize off-mesh connections, but in general RecastDemo is more meant to be a showcase of using the Recast library and APIs and probably isn't robust enough yet to be a full standalone navmesh generating/editing/exporting tool.  Sorry, I don't have a great answer here other than acknowledging this is likely broken and should be fixed.  

- Graham

Reply all
Reply to author
Forward
0 new messages