swordlegend / recastnavigation

Automatically exported from code.google.com/p/recastnavigation
zlib License
0 stars 0 forks source link

Detail vertices are misaligned in Detour #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When detail vertices are stored in dtCreateNavMeshTileData they are placed
in the buffer in addresses that are not aligned to 4 bytes. This causes
data misalignment exceptions on platforms like the Xbox360.

This probably applies to static meshes as well but I've not verified it.

I fixed it by storing the detail vertices right after the normal vertices
instead of after the polys. Because sizeof(dtTilePoly) is 30, that is what
ends up misaligning the detail vertices.

Original issue reported on code.google.com by daniel.a...@gmail.com on 19 Nov 2009 at 1:39

GoogleCodeExporter commented 9 years ago
I made a change int SVN version (R72), which aligns each chunk in the navmesh 
data to
4 bytes. Assuming the allocation of the data block is aligned to 4, this should 
fix
the alignment issue. Let me know if it still does not work for you.

Original comment by memono...@gmail.com on 20 Nov 2009 at 8:32