I've been working on the solution of generating a 2D nav mesh, and so far I've got a heightfield where I'm rendering it as:
rcRasterizeTriangle(ctx, bl, br, tr, RC_WALKABLE_AREA, hf);
rcRasterizeTriangle(ctx, tr, tl, bl, RC_WALKABLE_AREA, hf);
where bl, br, tr, tl are vertices containing the bounds of the level, with a Y position (height) of 0.0.
I'm then rasterizing the level's geometry with a height of (arbitrarily) 0.25f and a different area ID (0x01).
The only thing is, I'm not 100% sure if I set up the heightfield properly. In rcCreateHeightfield(), I set the 'ch' parameter [height of a cell] to something like 0.25f, my intent being that 0.0 is ground plane, >= 0.25 is the geometry. Again, ideally, I want the geometry to be "infinitely" tall, i.e. no navigation under or over the geometry.
Can anyone tell me if I'm on track, or if not, point me to functions that I should be using? Also, if I'm not giving enough info, just let me know.
Patrick