mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-08 04:31:08 -06:00
Merge pull request #2426 from OpenSpace/issue/2425
Fix bug that channels in cluster don't set the field of view to the same value after animating
This commit is contained in:
@@ -111,6 +111,7 @@ private:
|
||||
skybrowser::Animation<glm::dvec3> _targetAnimation =
|
||||
skybrowser::Animation(glm::dvec3(0.0), glm::dvec3(0.0), 0.0);
|
||||
bool _targetIsAnimating = false;
|
||||
bool _fovIsAnimating = false;
|
||||
|
||||
// Dragging
|
||||
glm::dvec3 _startTargetPosition = glm::dvec3(0.0);
|
||||
|
||||
@@ -283,11 +283,18 @@ void TargetBrowserPair::incrementallyAnimateToCoordinate() {
|
||||
aimTargetGalactic(_targetNode->identifier(), _targetAnimation.newValue());
|
||||
_fovAnimation.start();
|
||||
_targetIsAnimating = false;
|
||||
_fovIsAnimating = true;
|
||||
}
|
||||
// After the target has animated to its position, animate the field of view
|
||||
if (_fovAnimation.isAnimating()) {
|
||||
_browser->setVerticalFov(_fovAnimation.newValue());
|
||||
_targetRenderable->setVerticalFov(_browser->verticalFov());
|
||||
}
|
||||
else if (!_fovAnimation.isAnimating() && _fovIsAnimating) {
|
||||
// Set the finished field of view
|
||||
setVerticalFov(_fovAnimation.newValue());
|
||||
_fovIsAnimating = false;
|
||||
}
|
||||
}
|
||||
|
||||
void TargetBrowserPair::startFading(float goal, float fadeTime) {
|
||||
|
||||
Reference in New Issue
Block a user