mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 09:04:38 +00:00
Update guiMissionArea.cpp
simplify logic around skipping objects that push the mLevelBounds outside F32_MAX
This commit is contained in:
parent
4fc182444e
commit
47bff2f0eb
1 changed files with 2 additions and 7 deletions
|
|
@ -350,16 +350,11 @@ void GuiMissionAreaCtrl::updateLevelBitmap()
|
||||||
if (!obj)
|
if (!obj)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Skip if bounds are too large (e.g., GroundPlane or visual-only objects)
|
if (obj->isGlobalBounds())
|
||||||
const Box3F& box = obj->getWorldBox();
|
|
||||||
const F32 maxSizeThreshold = 2048.0f; // or tweak for your game scale
|
|
||||||
|
|
||||||
VectorF extents = box.getExtents();
|
|
||||||
if (extents.x > maxSizeThreshold || extents.y > maxSizeThreshold)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Merge bounds
|
// Merge bounds
|
||||||
mLevelBounds.intersect(box);
|
mLevelBounds.intersect(obj->getWorldBox());
|
||||||
}
|
}
|
||||||
|
|
||||||
const F32 minSize = 256.0f;
|
const F32 minSize = 256.0f;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue