Author Topic: My animation isn't working  (Read 2761 times)

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
My animation isn't working
« 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.
« Last Edit: July 03, 2008, 03:45:37 pm by zammbi »

Offline Mizuki Takase

  • int
  • **
  • Posts: 97
    • View Profile
Re: My animation isn't working
« Reply #1 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.

Online EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: My animation isn't working
« Reply #2 on: July 03, 2008, 07:34:47 pm »
Are you sure that walkframe is a float?

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: My animation isn't working
« Reply #3 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