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.
This commit is contained in:
Kawe Mazidjatari 2024-07-17 00:41:35 +02:00
parent fd234b8550
commit a37797d4bd

View File

@ -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();