mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-12 08:51:44 +00:00
Broaden selection mask for getting scene bounds if nothing is found.
This commit is contained in:
parent
7d9dddfa38
commit
1e30891891
1 changed files with 14 additions and 0 deletions
|
@ -319,6 +319,20 @@ void SceneWidget::update(double dt)
|
||||||
|
|
||||||
mRootNode->accept(boundsVisitor);
|
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);
|
mCurrentCamControl->setSceneBounds(boundingBox, CameraController::WorldUp);
|
||||||
|
|
||||||
mCamPositionSet = true;
|
mCamPositionSet = true;
|
||||||
|
|
Loading…
Reference in a new issue