[osg-users] AnimationPathCallback timeMultiplier

Dickinson, Alan J. ALAN.J.DICKINSON at saic.com
Wed Sep 3 11:46:32 PDT 2008

I have been creating an animation controller which allows the user to
start, stop and reset the animation being visualized in OSG. I have
added speed control keys which allow the user to speed up or slow down
the simulation by changing the timeMultiplier value in the
AnimationPathCallback class.


When I hit the speed up key it changes the timeMultiplier by a small
amount say 0.05 from the default 1.0 like it should.  But each time I
hit the speed up key the position of the object being animated jumps
ahead more than the small amount the speed up should be. When I hit the
slow down key which subtracts 0.05 from the default 1.0, the position of
the object jumps backwards in the path. Then continues from that point
on at the slower speed.


Is this the correct behavior? 


It does change the speed of the animation either faster or slower but
the position is jumping at the transition. If I hit the slow down key
enough I can go back to the beginning of the path. 


What am I doing wrong? Or is there a different way to control the speed
of an animation ?




Alan Dickinson

SAIC Intelligent Systems Applications Division

Sr. Software Engineer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080903/034af5f0/attachment-0002.htm>

More information about the osg-users mailing list