Right, so animating models using the Animate() method doesn't work at all for me; the model just stays still on its first frame. It's not model-specific, for even the models from the example code don't work. So, does the below code work on you guys' end? Does the zombie animate, or does this function just not work in MiniB3D?
Import sidesign.minib3d
Graphics3D 640, 480, 32, 2
Local cam:TCamera=CreateCamera()
PositionEntity cam,0,10,-15
CameraRange cam, 0.01, 100.0
Local light:TLight=CreateLight()
Local tex:TTexture = LoadTexture("C:/BlitzMax/examples/media/zombie.jpg", 0)
Local ent:TMesh=LoadAnimMesh("C:/BlitzMax/examples/media/zombie.b3d")
EntityTexture ent, tex
ScaleEntity ent, 1, 1, 1
Local idleAnim = ent.ExtractAnimSeq(0, 79)
' used by fps code
Local old_ms=MilliSecs()
Local renders=0
Local fps=0
While Not KeyDown(KEY_ESCAPE)
' control camera
MoveEntity cam,KeyDown(KEY_D)*0.1-KeyDown(KEY_A)*0.1,0,KeyDown(KEY_W)*0.1-KeyDown(KEY_S)*0.1
TurnEntity cam,KeyDown(KEY_DOWN)-KeyDown(KEY_UP),KeyDown(KEY_LEFT)-KeyDown(KEY_RIGHT),0
Animate ent, 2, 1.0, idleAnim, 0.0
UpdateWorld
RenderWorld
Flip
Wend
End
|