My animation isn't working

Started by zammbi, July 03, 2008, 03:40:56 PM

Previous topic - Next topic

zammbi

I have started learning jpct and finding it great. So far haven't had much trouble though wish there were tutorials to help.
Anyway one trouble I've had is my animation.
I am using md2 and animating like so:


if(walkframe >1){
walkframe = 0;
}
walkframe += .1f;
character.animate(walkframe,18);


If I change my sub-sequence I can see the model changing but if I change the index the model doesn't change at all. Even with a sub-sequence of 0.

Mizuki Takase

That is very strange indeed... An index of 0 should play all animations that the MD2 has. Since it seems like you are able to use animation sequence 18, then I assume that you should have been able to play all the animations prior to 18. To know what animation you are playing, you will have to read what animations are being loaded when JPCT starts up.

EgonOlsen

Are you sure that walkframe is a float?

zammbi

Haha thanks egon that was the problem, can't believe I just did a stupid mistake like that  :o