md2 animation playback issue

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
Mobeen
Posts: 37
Joined: Sat Mar 25, 2006 9:31 am
Location: Karachi, PAKISTAN

md2 animation playback issue

Post by Mobeen »

Hi all
I have a simple animation of a door opening and closing in an md2 file having 30 frames at 50 the door is opened completely and on 0 and 30 it is closed. My problems are
1) When I try to get the total frames in my animation, it returns 218 frames when I only have 30 in the md2.
2) I am trying to allow user to open the door by pressing the space bar. I have coded the intersection stuff and key handling. Based on users proximity to the door, i get the current door and play its animation using

Code: Select all

node->setFrameLoop(0, node->getFrameCount()/2);
This plays the first half of animation ok but at the end there is a jerk of multiple frames going back and then it comes to a halt. I then replaced this call with this

Code: Select all

node->setFrameLoop(0, 120);
Now it works ok no jerks If i change the end value above or below this value It gives me the same jerks again.
My question is Is this the correct way of doing such a thing or are there better alternatives?
3) What other options do i have apart from md2 , ms3d and b3d? What are others using ?

Thanks
Mobeen
Proud to be a PAKISTANI
Post Reply