Closed GoogleCodeExporter closed 9 years ago
the piture shows the situation.
thanks
Original comment by zhibin.l...@gmail.com
on 5 Nov 2010 at 6:12
Attachments:
Hi,
There is a catch! :) There are two special area ids : RC_NULL_AREA (0), and
RC_WALKABLE_AREA (63).
By default, all walkable spans are marked as RC_WALKABLE_AREA and unwalkable
are marked as RC_NULL_AREA. Those are special case IDs in Recast, Detour does
not have such restrictions.
SAMPLE_POLYAREA_GROUND happens to be 0. That is why it is treated as a hole.
There is historical reason why it is that way. I wanted to keep the navmesh
color to be blue when no area is marked (the navmesh draw function draws polys
with 0 id as blue). There is a piece of code at the end of the navmesh build
process, which matches the generation time areas to runtime areas [1].
So, the solution is to use id in range [1..62] for custom areas.
--mikko
[1]
http://code.google.com/p/recastnavigation/source/browse/trunk/RecastDemo/Source/
Sample_TileMesh.cpp#1114
Original comment by memono...@gmail.com
on 5 Nov 2010 at 7:54
Original comment by memono...@gmail.com
on 21 Nov 2010 at 2:53
Original issue reported on code.google.com by
zhibin.l...@gmail.com
on 5 Nov 2010 at 6:05