mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-09-18 08:14:34 +00:00
Detour: Fixed open list bug in pathfinder, nodes were never marked as closed!
Detour: Made the cost function to use polygon edge midpoints instead of polygon centroids.
This commit is contained in:
@@ -114,7 +114,7 @@ void Sample_StatMesh::toolRecalc()
|
||||
{
|
||||
if (m_sposSet && m_eposSet && m_startRef && m_endRef)
|
||||
{
|
||||
m_npolys = m_navMesh->findPath(m_startRef, m_endRef, m_polys, MAX_POLYS);
|
||||
m_npolys = m_navMesh->findPath(m_startRef, m_endRef, m_spos, m_epos, m_polys, MAX_POLYS);
|
||||
if (m_npolys)
|
||||
m_nstraightPath = m_navMesh->findStraightPath(m_spos, m_epos, m_polys, m_npolys, m_straightPath, MAX_POLYS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user