From 9b2fc8e183c5c04da3fb5b8433210b5b1351a5ff Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:15:12 +0200 Subject: [PATCH] Recast: increase adjustability of convex volume shape Make it MAX_COORD_FLOAT so it could cover the entire map regardless of where it is. --- src/naveditor/ConvexVolumeTool.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/naveditor/ConvexVolumeTool.cpp b/src/naveditor/ConvexVolumeTool.cpp index 4699b434..c3019461 100644 --- a/src/naveditor/ConvexVolumeTool.cpp +++ b/src/naveditor/ConvexVolumeTool.cpp @@ -23,7 +23,9 @@ #include "NavEditor/Include/ConvexVolumeTool.h" #include "NavEditor/Include/InputGeom.h" #include "NavEditor/Include/Editor.h" -#include +#include "naveditor/include/GameUtils.h" + +#include "coordsize.h" // Quick and dirty convex hull. @@ -112,9 +114,9 @@ void ConvexVolumeTool::reset() void ConvexVolumeTool::handleMenu() { - imguiSlider("Shape Height", &m_boxHeight, 0.1f, 2000.0f, 0.1f); - imguiSlider("Shape Descent", &m_boxDescent, 0.1f, 2000.0f, 0.1f); - imguiSlider("Poly Offset", &m_polyOffset, 0.0f, 1000.0f, 0.1f); + imguiSlider("Shape Height", &m_boxHeight, 0.1f, MAX_COORD_FLOAT, 0.1f); + imguiSlider("Shape Descent", &m_boxDescent, 0.1f, MAX_COORD_FLOAT, 0.1f); + imguiSlider("Poly Offset", &m_polyOffset, 0.0f, MAX_COORD_FLOAT/2, 0.1f); imguiSeparator();