Hi Felix,
I did something similar, maybe this "pause" method could help you.
_pause = !_pause;
if(_pause)
_startTick = _timer.tick();
else {
_timer.setStartTick(_timer.getStartTick()+(_timer.tick()-_startTick));
}
I save the tick when is paused and when I unpause I set the new
startTick of the timer (or the view in your case) to the prevous
startTick plus the time I have been paused, so all continues at the
same time.
Hope this helps,
Rafa.
On Sun, Oct 25, 2009 at 8:07 PM, Felix Ilbring <[email protected]> wrote:
> Hi,
>
> I have a simple question: How do i confince the handler to start the
> animation always from first second? Each time i fire the start event, i want
> to start the animation from time 0.
> If i stop the animation by 'Z', and press 'Z' again 5 sec later. it seems the
> path has moved on although if i fired the stop event.
>
> Is it possible to restart the Timer or something?
> i tried:
> _view->setStartTick(osg::Timer::instance()->tick());
>
> but has no effect.
>
> thanks for your help
> Cheers,
> Felix
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=18675#18675
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
--
Rafael Gaitán Linares
Instituto de Automática e Informática Industrial http://www.ai2.upv.es
Ciudad Politécnica de la Innovación
Universidad Politécnica de Valencia
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org