1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-10 21:40:15 +00:00

Broaden selection mask for getting scene bounds if nothing is found.

This commit is contained in:
Aesylwinn 2016-03-31 23:54:20 -04:00
parent 7d9dddfa38
commit 1e30891891

View File

@ -319,6 +319,20 @@ void SceneWidget::update(double dt)
mRootNode->accept(boundsVisitor);
// Remove mask if nothing is found
if (!boundingBox.valid())
{
boundsVisitor.reset();
boundsVisitor.setMask(~0);
mRootNode->accept(boundsVisitor);
}
// Set a default if there is still nothing found
if (!boundingBox.valid())
{
boundingBox.set(-1, -1, -1, 1, 1, 1);
}
mCurrentCamControl->setSceneBounds(boundingBox, CameraController::WorldUp);
mCamPositionSet = true;