Recast: clamp min of cell size and cell height

Going below a cell size of 12 will cause bad artifacts during the rasterization of the navmesh as the voxel mold would be too detailed. Also clamped the min of the cell height to 0.4 since any value below that will result in no navmesh getting generated on correct topology, so no point going lower.
The original min values for size and height were 0.1, but due to the scale differences with our maps and what recast was originally configured with, adjustments had to be made.
This commit is contained in:
Kawe Mazidjatari 2024-07-13 21:36:11 +02:00
parent 218634cb7e
commit ba33e46308

View File

@ -206,8 +206,8 @@ void Editor::handleCommonSettings()
ImGui::PushItemWidth(180.f);
ImGui::Text("Rasterization");
ImGui::SliderFloat("Cell Size", &m_cellSize, 0.1f, 100.0f);
ImGui::SliderFloat("Cell Height", &m_cellHeight, 0.1f, 100.0f);
ImGui::SliderFloat("Cell Size", &m_cellSize, 12.1f, 100.0f);
ImGui::SliderFloat("Cell Height", &m_cellHeight, 0.4f, 100.0f);
if (m_geom)
{