So close D: I finaly can process the wow maps in recast. I've copied most of the building process from the recast demo into a C++/CLI lib including recast and detour and it works realy well. I just have an annoying problem: my tiles are not connected. I've already read through serveral posts, like this or this but I still have the problem, that my tiles are a bit too small to connect.
Path finding inside a single tile works fine
But when I try to get the path between tiles, it looks like this
May anyone share his config values or point out whats wrong on my side?
I think the problem is, I'm using a TileSize of 533.3333 (like namereb suggested) which leads to an effective size of 177.777 for each tile -> 3x3 tiles, but most function in the recast lib expect integers for the size :/
Also some general questions:
How big do you make your tiles? I would like to do 1 tile per ADT but I dont know if this is a viable idea
Can I just add tiles from another adt to the navmesh and detour is able to find path between them?
What are reasonable values for dtNavMeshParams.maxTiles and dtNavMeshParams.maxPolys? I currently use 64 Tiles and 65536 polygons but I would like to load up to 9 adt files (9x3x3 => 81 tiles). Are 32k polygons enough?
Here is my configuration:
Code:#define IR_RECAST_TILE_SIZE (1600.0f / 3.0f) #define IR_RECAST_TILE_VOXEL_COUNT 1778 #define IR_RECAST_CELL_SIZE (IR_RECAST_TILE_SIZE / IR_RECAST_TILE_VOXEL_COUNT) #define IR_RECAST_CELL_HEIGHT 0.3f #define IR_RECAST_AGENT_HEIGHT 1.652778f #define IR_RECAST_AGENT_RADIUS 0.35f #define IR_RECAST_AGENT_MAX_CLIMB 1.0f #define IR_RECAST_AGENT_MAX_SLOPE 50.0f #define IR_RECAST_REGION_MIN_SIZE 20 #define IR_RECAST_REGION_MERGE_SIZE 40 #define IR_RECAST_EDGE_MAX_LEN 12.0f #define IR_RECAST_EDGE_MAX_ERROR 1.3f #define IR_RECAST_VERTS_PER_POLY 6.0f #define IR_RECAST_DETAIL_SAMPLE_DIST 3.0f #define IR_RECAST_DETAIL_SAMPLE_MAX_ERROR 1.25fCode:rcConfig m_cfg; memset(&m_cfg, 0, sizeof(m_cfg)); m_cfg.cs = IR_RECAST_CELL_SIZE; m_cfg.ch = IR_RECAST_CELL_HEIGHT; m_cfg.walkableSlopeAngle = IR_RECAST_AGENT_MAX_SLOPE; m_cfg.walkableHeight = (int)ceilf(IR_RECAST_AGENT_HEIGHT / m_cfg.ch); m_cfg.walkableClimb = (int)floorf(IR_RECAST_AGENT_MAX_CLIMB / m_cfg.ch); m_cfg.walkableRadius = (int)ceilf(IR_RECAST_AGENT_RADIUS / m_cfg.cs); m_cfg.maxEdgeLen = 8;//(int)(IR_RECAST_EDGE_MAX_LEN / IR_RECAST_CELL_SIZE); m_cfg.maxSimplificationError = IR_RECAST_EDGE_MAX_ERROR; m_cfg.minRegionArea = (int)rcSqr(IR_RECAST_REGION_MIN_SIZE); // Note: area = size*size m_cfg.mergeRegionArea = (int)rcSqr(IR_RECAST_REGION_MERGE_SIZE); // Note: area = size*size m_cfg.maxVertsPerPoly = (int)IR_RECAST_VERTS_PER_POLY; m_cfg.tileSize = (int)IR_RECAST_TILE_SIZE; m_cfg.borderSize = m_cfg.walkableRadius + 3; // Reserve enough padding. m_cfg.width = m_cfg.tileSize + m_cfg.borderSize*2; m_cfg.height = m_cfg.tileSize + m_cfg.borderSize*2; m_cfg.detailSampleDist = IR_RECAST_DETAIL_SAMPLE_DIST < 0.9f ? 0 : IR_RECAST_CELL_SIZE * IR_RECAST_DETAIL_SAMPLE_DIST; m_cfg.detailSampleMaxError = IR_RECAST_CELL_HEIGHT * IR_RECAST_DETAIL_SAMPLE_MAX_ERROR; rcVcopy(m_cfg.bmin, bmin); rcVcopy(m_cfg.bmax, bmax); // add border to bounds m_cfg.bmin[0] -= m_cfg.borderSize*m_cfg.cs; m_cfg.bmin[2] -= m_cfg.borderSize*m_cfg.cs; m_cfg.bmax[0] += m_cfg.borderSize*m_cfg.cs; m_cfg.bmax[2] += m_cfg.borderSize*m_cfg.cs;

![[Recast] Tiles not aligning](https://www.ownedcore.com/forums/./ocpbanners/3/6/6/2/4/2/5c4835331063f7e21bc14db43840c51b.png)
![TradeSafe Middleman [Recast] Tiles not aligning](https://www.ownedcore.com/assets/mm/images/wits.png)
![CoreCoins [Recast] Tiles not aligning](https://www.ownedcore.com/forums/images/styles/OwnedCoreFX/addimg/wicc.png)







Reply With Quote![[Recast] Tiles not aligning](https://www.ownedcore.com/images/ba/g/b2.gif)









