Hi, Thilo
You can do this with:
//animationPathCallback is a osg::AnimationPathCallback*
double animationTime = animationPathCallback->getAnimationTime();//use animation duration instead if you want to play from last frame
animationPathCallback->setTimeMultiplier(-1.0);
animationPathCallback->setTimeOffset(animationTime);
Cheers,
Sergey.
02.07.2012, 19:09, "Thilo Weigel" <thilo.wei...@web.de>:
Hi,Unfortunately I couldn't figure out how to play a given animation backwards. The animation is part of a model read from an osgt file. Looking at osgAnimation/Animation.cpp it would be straightforward to add an additional switch case to Animation::update()
case ONCE_BACKWARDS:
t = _originalDuration - t;
if (t < 0)
return false;
However, I wonder if there is an obvious way to achieve the same without having to modify the file Animation.cpp ?
Thank you for any hints!
Cheers,
Thilo
Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone und Android.
https://produkte.web.de/freemail_mobile_startseite/_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org