Fix more debugdraw

This commit is contained in:
Kawe Mazidjatari 2022-03-19 12:56:22 +01:00
parent 4330b8064b
commit 9b33e1b94e
3 changed files with 8 additions and 8 deletions

View File

@ -355,7 +355,7 @@ void CrowdToolState::handleRender()
if (dtTriArea2D(pos, s, s+3) < 0.0f)
col = duDarkenCol(col);
duAppendArrow(&dd, s[0],s[1]+0.2f,s[2], s[3],s[4]+0.2f,s[5], 0.0f, 0.3f, col);
duAppendArrow(&dd, s[0],s[1],s[2]+0.2f, s[3],s[4],s[5]+0.2f, 0.0f, 0.3f, col);
}
dd.end();
}
@ -490,12 +490,12 @@ void CrowdToolState::handleRender()
duDebugDrawCircle(&dd, pos[0], pos[1], pos[2]+height, radius, col, 2.0f);
duDebugDrawArrow(&dd, pos[0],pos[1]+height,pos[2],
pos[0]+dvel[0],pos[1]+height+dvel[1],pos[2]+dvel[2],
duDebugDrawArrow(&dd, pos[0],pos[1],pos[2]+height,
pos[0]+dvel[0],pos[1]+dvel[2],pos[2]+height+dvel[1],
0.0f, 0.4f, duRGBA(0,192,255,192), (m_agentDebug.idx == i) ? 2.0f : 1.0f);
duDebugDrawArrow(&dd, pos[0],pos[1]+height,pos[2],
pos[0]+vel[0],pos[1]+height+vel[1],pos[2]+vel[2],
duDebugDrawArrow(&dd, pos[0],pos[1],pos[2]+height,
pos[0]+vel[0],pos[1]+vel[2],pos[2]+height+vel[1],
0.0f, 0.4f, duRGBA(0,0,0,160), 2.0f);
}

View File

@ -134,7 +134,7 @@ void OffMeshConnectionTool::handleRender()
const float s = m_sample->getAgentRadius();
if (m_hitPosSet)
duDebugDrawCross(&dd, m_hitPos[0],m_hitPos[1]+0.1f,m_hitPos[2], s, duRGBA(0,0,0,128), 2.0f);
duDebugDrawCross(&dd, m_hitPos[0],m_hitPos[1],m_hitPos[2]+0.1f, s, duRGBA(0,0,0,128), 2.0f);
InputGeom* geom = m_sample->getInputGeom();
if (geom)

View File

@ -407,8 +407,8 @@ inline void evalArc(const float x0, const float y0, const float z0,
const float h, const float u, float* res)
{
res[0] = x0 + dx * u;
res[1] = y0 + dy * u + h * (1-(u*2-1)*(u*2-1));
res[2] = z0 + dz * u;
res[1] = y0 + dy * u;
res[2] = z0 + dz * u + h * (1 - (u * 2 - 1) * (u * 2 - 1));
}