diff --git a/src/naveditor/Editor.cpp b/src/naveditor/Editor.cpp index be05693d..4e537ad4 100644 --- a/src/naveditor/Editor.cpp +++ b/src/naveditor/Editor.cpp @@ -135,6 +135,7 @@ Editor::Editor() : m_filterLedgeSpans(true), m_filterWalkableLowHeightSpans(true), m_traverseRayDynamicOffset(true), + m_buildBvTree(true), m_selectedNavMeshType(NAVMESH_SMALL), m_loadedNavMeshType(NAVMESH_SMALL), m_navmeshName(NavMesh_GetNameForType(NAVMESH_SMALL)), @@ -369,6 +370,8 @@ void Editor::handleCommonSettings() rdVcopy(navMeshBMin, m_geom->getOriginalNavMeshBoundsMin()); rdVcopy(navMeshBMax, m_geom->getOriginalNavMeshBoundsMax()); } + + ImGui::Checkbox("Build BVTree", &m_buildBvTree); } ImGui::Separator(); diff --git a/src/naveditor/Editor_TileMesh.cpp b/src/naveditor/Editor_TileMesh.cpp index c7f617c8..944fe540 100644 --- a/src/naveditor/Editor_TileMesh.cpp +++ b/src/naveditor/Editor_TileMesh.cpp @@ -1154,7 +1154,7 @@ unsigned char* Editor_TileMesh::buildTileMesh(const int tx, const int ty, const rdVcopy(params.bmax, m_pmesh->bmax); params.cs = m_cfg.cs; params.ch = m_cfg.ch; - params.buildBvTree = true; + params.buildBvTree = m_buildBvTree; const bool navMeshBuildSuccess = dtCreateNavMeshData(¶ms, &navData, &navDataSize); diff --git a/src/naveditor/include/Editor.h b/src/naveditor/include/Editor.h index 491e94b0..7a7ca562 100644 --- a/src/naveditor/include/Editor.h +++ b/src/naveditor/include/Editor.h @@ -266,6 +266,7 @@ protected: bool m_filterLedgeSpans; bool m_filterWalkableLowHeightSpans; bool m_traverseRayDynamicOffset; + bool m_buildBvTree; int m_minTileBits; int m_maxTileBits;