mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
NavMeshTesterTool XZY->XYZ
This commit is contained in:
parent
34076142ba
commit
4ada4cef72
@ -941,15 +941,14 @@ void NavMeshTesterTool::recalc()
|
||||
#endif
|
||||
m_navQuery->findPolysAroundCircle(m_startRef, m_spos, dist, &m_filter,
|
||||
m_polys, m_parent, 0, &m_npolys, MAX_POLYS);
|
||||
|
||||
}
|
||||
}
|
||||
else if (m_toolMode == TOOLMODE_FIND_POLYS_IN_SHAPE)
|
||||
{
|
||||
if (m_sposSet && m_startRef && m_eposSet)
|
||||
{
|
||||
const float nx = (m_epos[1] - m_spos[1])*0.25f;
|
||||
const float ny = -(m_epos[0] - m_spos[0])*0.25f;
|
||||
const float nx = -(m_epos[1] - m_spos[1])*0.25f;
|
||||
const float ny = (m_epos[0] - m_spos[0])*0.25f;
|
||||
const float agentHeight = m_sample ? m_sample->getAgentHeight() : 0;
|
||||
|
||||
m_queryPoly[0] = m_spos[0] + nx*1.2f;
|
||||
@ -1216,7 +1215,7 @@ void NavMeshTesterTool::handleRender()
|
||||
dd.depthMask(false);
|
||||
getPolyCenter(m_navMesh, m_parent[i], p0);
|
||||
getPolyCenter(m_navMesh, m_polys[i], p1);
|
||||
duDebugDrawArc(&dd, p0[0],p0[1],p0[2], p1[0],p1[1],p1[2], 0.25f, 0.0f, 0.4f, duRGBA(0,0,0,128), 2.0f);
|
||||
duDebugDrawArc(&dd, p0[0],p0[1],p0[2], p1[0],p1[1],p1[2], 0.25f, 0.0f, 30.0f, duRGBA(0,0,0,128), 2.0f);
|
||||
dd.depthMask(true);
|
||||
}
|
||||
dd.depthMask(true);
|
||||
@ -1244,7 +1243,7 @@ void NavMeshTesterTool::handleRender()
|
||||
dd.depthMask(false);
|
||||
getPolyCenter(m_navMesh, m_parent[i], p0);
|
||||
getPolyCenter(m_navMesh, m_polys[i], p1);
|
||||
duDebugDrawArc(&dd, p0[0],p0[1],p0[2], p1[0],p1[1],p1[2], 0.25f, 0.0f, 0.4f, duRGBA(0,0,0,128), 2.0f);
|
||||
duDebugDrawArc(&dd, p0[0],p0[1],p0[2], p1[0],p1[1],p1[2], 0.25f, 0.0f, 30.0f, duRGBA(0,0,0,128), 2.0f);
|
||||
dd.depthMask(true);
|
||||
}
|
||||
dd.depthMask(true);
|
||||
@ -1278,7 +1277,7 @@ void NavMeshTesterTool::handleRender()
|
||||
dd.depthMask(false);
|
||||
getPolyCenter(m_navMesh, m_parent[i], p0);
|
||||
getPolyCenter(m_navMesh, m_polys[i], p1);
|
||||
duDebugDrawArc(&dd, p0[0],p0[1],p0[2], p1[0],p1[1],p1[2], 0.25f, 0.0f, 0.4f, duRGBA(0,0,0,128), 2.0f);
|
||||
duDebugDrawArc(&dd, p0[0],p0[1],p0[2], p1[0],p1[1],p1[2], 0.25f, 0.0f, 30.0f, duRGBA(0,0,0,128), 2.0f);
|
||||
dd.depthMask(true);
|
||||
}
|
||||
|
||||
@ -1302,8 +1301,8 @@ void NavMeshTesterTool::handleRender()
|
||||
float delta[3], norm[3], p0[3], p1[3];
|
||||
dtVsub(delta, s+3,s);
|
||||
dtVmad(p0, s, delta, 0.5f);
|
||||
norm[0] = delta[2];
|
||||
norm[1] = -delta[0]; //NB(warmist):unsure TODO
|
||||
norm[0] = delta[1];
|
||||
norm[1] = -delta[0];
|
||||
norm[2] = 0;
|
||||
dtVnormalize(norm);
|
||||
dtVmad(p1, p0, norm, agentRadius*0.5f);
|
||||
|
Loading…
x
Reference in New Issue
Block a user