Hi Robert, thank you for your answer. I was using osg::AnimationPath for individual animations, but when trying to combine both animations the behaviour is not the desired. The problem is that I want to change dynamically the pivot point of the translation animation. In other words, the rotation has to be always the same (centered in the model), and it has also to translate around a dynamic pivot point. If I do this separately, it works. But if I add both animations using addUpdateCallback, only the translation is working.
I am a bit lost in the animationpath concept. Is it possible to add 2 animationpaths to the same PositionAttitudeTransform? Thank you. Best regards -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Robert Osfield Sent: jueves, 25 de octubre de 2012 13:06 To: OpenSceneGraph Users Subject: Re: [osg-users] Rotation animation Hi Hector, There several ways of achiving what you want, one could precompute all the positions and put them into an osg::AnimationPath and attach this via an osg::AnimationPathCallback to a transform above the subgraph you want to move - see the osganimation example, or write your own update callback that computes the position on the fly for each new frame. Perhaps I'd go for the callback approach. Robert. On 25 October 2012 08:22, Héctor Martínez <[email protected]> wrote: > Hi, > > > > I am trying to make an animation to one model. What I want is to > rotate the model around its own axis and also to translate (rotation > again) around another pivot point, like Earth movements. I can achieve > both movements separately, but I dont know how to make both > animations work at the same time. I have tried nesting animations and similar ideas, but without luck. > > > > Could somebody give me some clues to get the solution to my problem? > > > > Thank you in advance, > > > > Best regards > > > _______________________________________________ > 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

