You can try to play clever tricks with animation:getStartTime() and setStartTime()
Animation manager uses simulation time for update, so if you know this value either from viewer framestamp or some other source, you can calculate what start time you should set to get smooth transition from one animation speed to another, and even smoothly play animation backwards switching to PPONG animation play mode.
Also there are TimelineAnimationManager, which have a lot of functionality with regard to controlling animation speed and direction (and also animation tracks blending), it easy to use and have a lot of useful features, but there are one drawback - it operates only on distinct animation keys without interpolating between them (at least it was this way when i used it last time), so animation will jitter if you dont have a lot of keyframes (like at least 30 keys per frame).
Cheers.
31.08.2012, 14:31, "Trajce Nikolov NICK" <[email protected]>:
Thanks Sergey,I just did it like this and it seam to work although the transition is not smooth from one to another scale. I was waiting for some like TimeScale or such. Anyway, any idea how to playback frame by frame forward/backward?Thanks a lotNickOn Fri, Aug 31, 2012 at 12:22 PM, Sergey Polischuk <[email protected]> wrote:Hi NickThere are setDuration method in osgAnimation::Animation interface. Using it you can rescale animation to any duration you want.i.e. to slowdown animation N times you can useanimation->computeDuration();
animation->setDuration(animation->getDuration() * N);Cheers,Sergey.31.08.2012, 13:02, "Trajce Nikolov NICK" <[email protected]>:Hi community,Lately I was doing something with animations (using osgAnimations). Any hints how to speed up/slow down animations (osgAnimation::Animation)Thanks a bunchNick_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

