Quantcast
Channel: MarsHut
Viewing all articles
Browse latest Browse all 6551

Pausing animations at start position

$
0
0
Hi all,

I am having problems using animations in the osgb-format. Before they start
moving I want them to stay still at the first position in the animation
path. I tried to reset the animation and then pause it using the following
code.

osg::ref_ptr<osg::AnimationPathCallback> animationCallbackObject;









animationCallbackObject->reset();

animationCallbackObject->setPause(true);

The problem is that it stops at the last position of the animation path,
even if I pause it immediately after I have used reset. When I use reset
again, it therefore disappears from the last position and the animation
starts from the beginning. I would like to use it as an object standing
still at the first position, and thereafter starts moving when an event is
triggered. I also have set the animation loop mode to NO_LOOPING.

Does anyone have a suggestion of how to solve that?

Thanks for your help!

Kind regards,

Helena

Viewing all articles
Browse latest Browse all 6551

Latest Images

Trending Articles



Latest Images