three-pathfinding icon indicating copy to clipboard operation
three-pathfinding copied to clipboard

How to export navmesh to make sure zone's groups length = 1

Open yaoyutian opened this issue 2 years ago • 1 comments

After Pathfinding.createZone ,zone's groups length greater then 1; while start position and end position in different group, findPath Failed! after reading src code ,i still can't figure out why a simple mesh atfer createzone ,get multiple groups. can anyone help! how do I need to do the exportation of nav mesh , can make zone group's length =1?

截屏2022-03-30 下午8 49 58 截屏2022-03-30 下午8 52 30

mesh file (change Filename Extension from txt to glb) 3-3.txt

yaoyutian avatar Mar 30 '22 13:03 yaoyutian

The mesh topology needs to be very clean to be used as a navmesh. Projects like 'recast' (previously available in Blender) did this automatically, but it's necessary if you're building the navmesh yourself too. Doing a 'merge by distance' in Blender might help, try the file below?

navmesh.glb.zip

It's also generally a good thing if the navmesh has roughly similar sizes of triangles, long/thin triangles may cause weird pathfinding choices.

donmccurdy avatar Apr 08 '22 15:04 donmccurdy