Recast: add option to disable BVTree creation

This commit is contained in:
Kawe Mazidjatari 2024-08-21 11:11:32 +02:00
parent dd9493d651
commit 5aff50f8cf
3 changed files with 5 additions and 1 deletions

View File

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

View File

@ -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(&params, &navData, &navDataSize);

View File

@ -266,6 +266,7 @@ protected:
bool m_filterLedgeSpans;
bool m_filterWalkableLowHeightSpans;
bool m_traverseRayDynamicOffset;
bool m_buildBvTree;
int m_minTileBits;
int m_maxTileBits;