CAnimatedMeshSceneNode FramesPerSecond fixed at 25 for MS3D

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
anjinn
Posts: 7
Joined: Sun Apr 05, 2009 6:50 pm

CAnimatedMeshSceneNode FramesPerSecond fixed at 25 for MS3D

Post by anjinn »

Irrlich version 1.7.1

CMS3DMeshFileLoader.cpp (ln 399) reads the frames per second from a milkshape file, but when a IAnimatedMeshSceneNode is created from the resulting mesh, FramesPerSecond is set statically to 25.f/1000.f in the constructor (CAnimatedMeshSceneNode.cpp ln 48 ).

There is a function in CAnimatedMeshSceneNode.cpp (setAnimationSpeed, ln 523) that appears to be for fixing up the framerate, and it does appear to be being called for MD2 Meshes, but this does not appear to be being called for any other supported mesh types.

I checked in the forum, but could find no mention of this. I also checked the release notes for 1.7.2, but there was no mention of this issue there either, so I thought I'd mention it. Changing the "FramesPerSecond = 25.f/1000.f; to 30 fixed the speed issue for me, but it would be nice if it was dynamic.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Unfortunately, the SAnimatedMesh does not hold this information. I guess it shoudl, though. I will add this field for Irrlicht 1.8. Once we have this information, we should be able to copy it over to the scene node as well.
Which speed does the console log print for your mesh? Is it the correct number?
anjinn
Posts: 7
Joined: Sun Apr 05, 2009 6:50 pm

Post by anjinn »

Yes, the console prints out the correct fps for the model (30 in my case).

By the way, Thanks for the quick response and heads up for this. I really appreciate it, as well as all the great work you guys are doing!
Post Reply