Sorry if I'm spamming the board with too many questions, but I'm really having trouble with this one. I can't seem to stop the animations (or the rotation) from looping. I've tried stopping it after a number of frames, but the number of scene and mesh frames doesn't match. I've found the following thread from some years ago, but I'm not sure if this is still the best solution.
http://irrlicht.sourceforge.net/forum/v ... php?t=2511
Stop animations from looping
Re: Stop animations from looping
There is IAnimatedMeshSceneNode::setLoopMode which allows setting the animation to non-looped. You can also stop it by setting setAnimationSpeed to 0. Or set setFrameLoop to a single value (maybe you need to give setCurrentFrame the same value).
You can catch the end of an animation by setting a callback with setAnimationEndCallback.
Here is the documentation for this all by the way: http://irrlicht.sourceforge.net/docu/cl ... _node.html
You can catch the end of an animation by setting a callback with setAnimationEndCallback.
Here is the documentation for this all by the way: http://irrlicht.sourceforge.net/docu/cl ... _node.html
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Stop animations from looping
That's great. Thanks a lot!