Use simulation time for spin and timed animations
This commit is contained in:
@@ -850,7 +850,7 @@ void SpinAnimCallback::operator()(osg::Node* node, osg::NodeVisitor* nv)
|
|||||||
if (!cv)
|
if (!cv)
|
||||||
return;
|
return;
|
||||||
if (!_condition || _condition->test()) {
|
if (!_condition || _condition->test()) {
|
||||||
double t = nv->getFrameStamp()->getReferenceTime();
|
double t = nv->getFrameStamp()->getSimulationTime();
|
||||||
double rps = _animationValue->getValue() / 60.0;
|
double rps = _animationValue->getValue() / 60.0;
|
||||||
ref_ptr<ReferenceValues>
|
ref_ptr<ReferenceValues>
|
||||||
refval(static_cast<ReferenceValues*>(_referenceValues.get()));
|
refval(static_cast<ReferenceValues*>(_referenceValues.get()));
|
||||||
@@ -1862,7 +1862,7 @@ public:
|
|||||||
_current_index = _current_index % nChildren;
|
_current_index = _current_index % nChildren;
|
||||||
|
|
||||||
// update the time and compute the current systems time value
|
// update the time and compute the current systems time value
|
||||||
double t = nv->getFrameStamp()->getReferenceTime();
|
double t = nv->getFrameStamp()->getSimulationTime();
|
||||||
if (_last_time_sec == SGLimitsd::max()) {
|
if (_last_time_sec == SGLimitsd::max()) {
|
||||||
_last_time_sec = t;
|
_last_time_sec = t;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user