Climb height to int should floor not ceil.

This commit is contained in:
Mikko Mononen
2010-01-29 13:02:54 +00:00
parent 9bf68216a3
commit d6a5eb5ee2
2 changed files with 4 additions and 4 deletions

View File

@@ -600,7 +600,7 @@ bool Sample_SoloMeshTiled::handleBuild()
m_cfg.ch = m_cellHeight;
m_cfg.walkableSlopeAngle = m_agentMaxSlope;
m_cfg.walkableHeight = (int)ceilf(m_agentHeight / m_cfg.ch);
m_cfg.walkableClimb = (int)ceilf(m_agentMaxClimb / m_cfg.ch);
m_cfg.walkableClimb = (int)floorf(m_agentMaxClimb / m_cfg.ch);
m_cfg.walkableRadius = (int)ceilf(m_agentRadius / m_cfg.cs);
m_cfg.maxEdgeLen = (int)(m_edgeMaxLen / m_cellSize);
m_cfg.maxSimplificationError = m_edgeMaxError;