www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: zammbi on July 03, 2008, 03:40:56 pm

Title: My animation isn't working
Post by: zammbi on July 03, 2008, 03:40:56 pm
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:

Code: [Select]

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.
Title: Re: My animation isn't working
Post by: Mizuki Takase on July 03, 2008, 05:15:04 pm
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.
Title: Re: My animation isn't working
Post by: EgonOlsen on July 03, 2008, 07:34:47 pm
Are you sure that walkframe is a float?
Title: Re: My animation isn't working
Post by: zammbi on July 04, 2008, 03:08:17 am
Haha thanks egon that was the problem, can't believe I just did a stupid mistake like that  :o