[SOLVED] Play animation only once

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ritti
Posts: 90
Joined: Tue Apr 10, 2012 12:09 pm

[SOLVED] Play animation only once

Post by ritti »

Hi,
as the title says I would like to play an animation of an object only once.
I know I could check the time passed after the animation started and stop it after a certain time passed,
or get the current frame of the animation and as soon as the mesh reaches a certain frame, stop the animation.

But I wanted to ask if there is a function instead of setFrameLoop wich plays the animation only once,
without having to check in every frame if the animation reached the end.

First of all, this two methods aren't that precise (if I have a slow pc), and secondly I don't want to check every frame, for every object if its animation reached the end :)

Thanks in advance and best regards
Ritti
Last edited by ritti on Wed Sep 04, 2013 9:57 pm, edited 1 time in total.
CuteAlien
Admin
Posts: 9929
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Play animation only once

Post by CuteAlien »

setLoopMode(false) should do that I think.
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
ritti
Posts: 90
Joined: Tue Apr 10, 2012 12:09 pm

Re: Play animation only once

Post by ritti »

Thank you that was what I was looking for :)
Post Reply