[BUG] .x models skipping animations

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Aelis440
Posts: 52
Joined: Sun Oct 05, 2008 8:45 pm

[BUG] .x models skipping animations

Post by Aelis440 »

Hello, I've been using .x files for my animated models and have noticed that when Irrlicht runs a frame loop, it skips the last few frames. If I have a model with 60 frames, it will play 0-58 and then repeat, causing a slight choppiness in the loop. You can see it quite clearly in this model:

http://smallguild.com/Frontier/selector.x

(right-click, "save as", otherwise it will probably just open as a text file in your browser)

I suggest slowing down the animation speed, it happens just at the end of the frame loop. If you go into the text file and manually add two more frames to the end, the animation runs beautifully. Here is a brief code snippet of how I am using the model:

Code: Select all

targetCircle[i] = smgr->addAnimatedMeshSceneNode(smgr->getMesh("media/teal-target.x"), 0, 0, vector3df(0, 70, 0));
			targetCircle[i]->setScale(vector3df(15,15,15));
			targetCircle[i]->setFrameLoop(0, 50);
			targetCircle[i]->setMaterialType(EMT_TRANSPARENT_VERTEX_ALPHA);
			targetCircle[i]->setAnimationSpeed(10);
If this is not a bug, I'd love to know what I'm doing wrong. It seems unlikely to me that adding two "dead" frames at the end of the text file is the proper way to go about doing this. : ) Thanks for all of your guys' help!
Last edited by Aelis440 on Tue Dec 16, 2008 10:21 pm, edited 1 time in total.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

There does seem to be an issue, but animation is more hybrid and luke's thang.

There's a bug tracking this.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Aelis440
Posts: 52
Joined: Sun Oct 05, 2008 8:45 pm

Post by Aelis440 »

Great to know, thanks a ton. For the moment, I'll just jimmy-rig my animations to work until you guys get it fixed on your end.
Post Reply