From a37797d4bd30c7e65c1da516c64b48f58375d7b6 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Wed, 17 Jul 2024 00:41:35 +0200 Subject: [PATCH] Recast: disable duplicate rendering of off-mesh connections Don't render the geom off-mesh connection, this is already done when the tool is enabled, and we don't want to render it outside the tool since it would overlap with the built off-mesh connection. --- src/naveditor/Editor_Common.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/naveditor/Editor_Common.cpp b/src/naveditor/Editor_Common.cpp index 20668dec..3d980023 100644 --- a/src/naveditor/Editor_Common.cpp +++ b/src/naveditor/Editor_Common.cpp @@ -383,7 +383,11 @@ void Editor_StaticTileMeshCommon::renderTileMeshData() // TODO: also add flags for this m_geom->drawConvexVolumes(&m_dd, recastDrawOffset); - m_geom->drawOffMeshConnections(&m_dd, recastDrawOffset); + + // NOTE: commented out because this already gets rendered when the off-mesh + // connection tool is activated. And if we generated an off-mesh link, this + // would overlap with that as well. + //m_geom->drawOffMeshConnections(&m_dd, recastDrawOffset); if (m_tool) m_tool->handleRender(); @@ -588,7 +592,11 @@ void Editor_DynamicTileMeshCommon::renderTileMeshData() // TODO: also add flags for this m_geom->drawConvexVolumes(&m_dd, recastDrawOffset); - m_geom->drawOffMeshConnections(&m_dd, recastDrawOffset); + + // NOTE: commented out because this already gets rendered when the off-mesh + // connection tool is activated. And if we generated an off-mesh link, this + // would overlap with that as well. + //m_geom->drawOffMeshConnections(&m_dd, recastDrawOffset); if (m_tool) m_tool->handleRender();