senoutouya / recastnavigation

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

End polygon is not added to polygons array in findStraightPath #153

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When calling findStraightPath the end polygon is not added to the polygon 
array. Instead it is set to 0. That means that:
straightPathFlags[n-1] = DT_STRAIGHTPATH_END
but
straightPathRefs[n-1] = 0

where n is the number of points/flags/polygons, after the function has returned.

Original issue reported on code.google.com by DanteDr...@gmail.com on 5 Dec 2010 at 1:25

GoogleCodeExporter commented 9 years ago
That is by design. The returned polygon describes the polygon which is after 
the vertex, the polygon that was entered to. So the last vertex enters "void".

The feature was added when I added support for off-mesh connections. It allows 
you to match a vertex in the straight path to a off-mesh connection.

Original comment by memono...@gmail.com on 5 Dec 2010 at 1:40

GoogleCodeExporter commented 9 years ago

Original comment by memono...@gmail.com on 3 Feb 2011 at 9:31