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.
CAnimatedMeshSceneNode FramesPerSecond fixed at 25 for MS3D
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
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?
Which speed does the console log print for your mesh? Is it the correct number?