fixed navmesh tool

This commit is contained in:
ikpil 2023-06-26 21:20:18 +09:00
parent 5dd072f3a3
commit 3e6e67cf25
1 changed files with 2 additions and 0 deletions

View File

@ -195,6 +195,7 @@ public class TestNavmeshTool : IRcTool
{ {
if (m_sposSet && m_eposSet && m_startRef != 0 && m_endRef != 0) if (m_sposSet && m_eposSet && m_startRef != 0 && m_endRef != 0)
{ {
m_polys = new();
m_navQuery.FindPath(m_startRef, m_endRef, m_spos, m_epos, m_filter, ref m_polys, m_navQuery.FindPath(m_startRef, m_endRef, m_spos, m_epos, m_filter, ref m_polys,
new(enableRaycast ? DtNavMeshQuery.DT_FINDPATH_ANY_ANGLE : 0, float.MaxValue)); new(enableRaycast ? DtNavMeshQuery.DT_FINDPATH_ANY_ANGLE : 0, float.MaxValue));
if (0 < m_polys.Count) if (0 < m_polys.Count)
@ -327,6 +328,7 @@ public class TestNavmeshTool : IRcTool
{ {
if (m_sposSet && m_eposSet && m_startRef != 0 && m_endRef != 0) if (m_sposSet && m_eposSet && m_startRef != 0 && m_endRef != 0)
{ {
m_polys = new();
m_navQuery.FindPath(m_startRef, m_endRef, m_spos, m_epos, m_filter, ref m_polys, m_navQuery.FindPath(m_startRef, m_endRef, m_spos, m_epos, m_filter, ref m_polys,
new(enableRaycast ? DtNavMeshQuery.DT_FINDPATH_ANY_ANGLE : 0, float.MaxValue)); new(enableRaycast ? DtNavMeshQuery.DT_FINDPATH_ANY_ANGLE : 0, float.MaxValue));
if (0 < m_polys.Count) if (0 < m_polys.Count)