Best way to animate model?

Blitz3D Forums/Blitz3D Beginners Area/Best way to animate model?

Pineapple(Posted 2006) [#1]
Hiya all, I've decided to have another crack at 3D, and I'm playing around with a model I picked up on the internet...

I've got it moving around a terrian, which was nice, though, I'm not sure what is the best way to animate it. Is it roughly the same as 2D, where you count the frames inside a If Keydown expression, or is there a better way?

Here's the sequences:-

2-14 Walk
16-26 Run
28-40 Jump

Any little code snippet would be really appreciated! :)

Thanks

Dabz


jhocking(Posted 2006) [#2]
It's not much like 2D. Basically, when the player first hits the button to move, you call Animate to start playing an animation. Once the animation is playing you no longer call Animate, but make sure to call UpdateWorld every frame to increment the animation playback. Then when they let go of the button call Animate to switch to a different animation.


Pineapple(Posted 2006) [#3]
So you set Animate in a true/false flag, because if you didnt, the model will stutter?

I'll have a play anyway!

Cheers j

Dabz

EDIT: I must be going blind or something... http://www.blitzbasic.com/Community/posts.php?topic=56405