Made the AnimationPathManipulator::home() reset the timming of the

animation path so that the timing always starts at the begining of the loop.
This commit is contained in:
Robert Osfield
2003-04-09 10:26:50 +00:00
parent 2c030170ff
commit ca4b558994

View File

@@ -50,7 +50,12 @@ void AnimationPathManipulator::home(const GUIEventAdapter& ea,GUIActionAdapter&)
if (_animationPath.valid())
{
_timeOffset = _animationPath->getFirstTime()-ea.time();
}
// reset the timing of the animation.
_numOfFramesSinceStartOfTimedPeriod=-1;
}
void AnimationPathManipulator::init(const GUIEventAdapter& ea,GUIActionAdapter& aa)
@@ -84,6 +89,7 @@ bool AnimationPathManipulator::handle(const osgGA::GUIEventAdapter& ea,osgGA::GU
home(ea,us);
us.requestRedraw();
us.requestContinuousUpdate(false);
return true;
}
else if(ea.getKey() == 'p')