Hiho everybody,
if I add an IAnimatedMeshSceneNode and then make node->setCurrentFrame (1.f), the mesh doesn't start at frame 1 but on a "random" later frame.
I think the start frame depends on the time passed until I add the mesh.
Then another problem (well I think its for the same reason) is, when I add the same mesh a second time,
it doesn't matter when I add it, the mesh starts at exactly the same frame the first mesh is in this moment.
So both meshes plays the same animation at the same time even if I tell the second mesh to setCurrentFrame
I found some posts due to a Bug similar to my problem, but the bug was related to Irrlicht 1.6 and I'm using 1.8.
Does this bug still persist? Or am I missing something else?
Thanks in advance and best regards,
Ritti
[SOLVED] setCurrentFrame doesn't work
[SOLVED] setCurrentFrame doesn't work
Last edited by ritti on Thu May 16, 2013 4:41 pm, edited 1 time in total.
Re: setCurrentFrame doesn't work
I guess I won't be realy helpful by answering, but what if you don't set any current frame?
It would start at the begining, certainly.
So, to help you a bit, maybe you should find the setCurrentFrame value corresponding to your current frame in the scene. And maybe write a little function to make it relate to it.
If all of your work is not depending on legacy's variables, it could debug you.
And if it is, sorry, I told what I thought :/
Not probably what you expected..
It would start at the begining, certainly.
So, to help you a bit, maybe you should find the setCurrentFrame value corresponding to your current frame in the scene. And maybe write a little function to make it relate to it.
If all of your work is not depending on legacy's variables, it could debug you.
And if it is, sorry, I told what I thought :/
Not probably what you expected..
Re: setCurrentFrame doesn't work
Hi markmze,
first of all, thank you for your answer
I first tried it without setting any current frame, but the result was the same.
And writing a function to get the corresponding frame (are you thinking about starting the animation as soon as the scene passes the corresponding frame so that my animation starts at the beginning?)
is no option because the animation is too long and so it could take too much time until the animation starts.
Since its for buildings or units for a strategy game, it should start the animation as soon as its finished but not 2 seconds later
Edit:
Well now I fell quite stupid
I started with this project with Irrlicht 1.6 and as I installed the new version I forgot to copy the new Irrlicht library to my game Folder.
Now it works as it should
Best regards
Ritti
first of all, thank you for your answer
I first tried it without setting any current frame, but the result was the same.
And writing a function to get the corresponding frame (are you thinking about starting the animation as soon as the scene passes the corresponding frame so that my animation starts at the beginning?)
is no option because the animation is too long and so it could take too much time until the animation starts.
Since its for buildings or units for a strategy game, it should start the animation as soon as its finished but not 2 seconds later
Edit:
Well now I fell quite stupid
I started with this project with Irrlicht 1.6 and as I installed the new version I forgot to copy the new Irrlicht library to my game Folder.
Now it works as it should
Best regards
Ritti
Re: [SOLVED] setCurrentFrame doesn't work
Hi see you solved, what was that, just by curiosity?
Re: [SOLVED] setCurrentFrame doesn't work
The problem was that I forgot to update the irrlicht library in my game folder after upgrading Irrlicht
So my Game used the old 1.6 or 1.7 (I'm not sure) lib and there was a bug with setCurrentFrame in the animation system.
So my Game used the old 1.6 or 1.7 (I'm not sure) lib and there was a bug with setCurrentFrame in the animation system.