This doesn't seem to be working for me. I tried the following code in Blitz3D without a problem, but when porting to miniB3D I can't switch between anims...
Graphics3D 640,480,0,2
mesh = LoadAnimMesh("1.b3d")
LoadAnimSeq(mesh,"2.b3d")
LoadAnimSeq(mesh,"3.b3d")
LoadAnimSeq(mesh,"4.b3d")
LoadAnimSeq(mesh,"5.b3d")
LoadAnimSeq(mesh,"6.b3d")
LoadAnimSeq(mesh,"7.b3d")
LoadAnimSeq(mesh,"8.b3d")
EntityFX mesh,1
PositionEntity mesh,-15,-15,0
Animate mesh,1,0.5
pivot=CreatePivot()
cam=CreateCamera(pivot)
PositionEntity cam,0,100,-400
lit=CreateLight()
RotateEntity lit,45,45,0
trans=10
While Not KeyHit(KEY_ESCAPE)
If KeyHit(KEY_SPACE) Then trans=10-trans
If KeyHit(KEY_1) Animate mesh,1,.5,0,trans
If KeyHit(KEY_2) Animate mesh,1,.5,1,trans
If KeyHit(KEY_3) Animate mesh,1,.5,2,trans
If KeyHit(KEY_4) Animate mesh,1,.5,3,trans
If KeyHit(KEY_5) Animate mesh,1,.5,4,trans
If KeyHit(KEY_6) Animate mesh,1,.5,5,trans
If KeyHit(KEY_7) Animate mesh,1,.5,6,trans
If KeyHit(KEY_8) Animate mesh,1,.5,7,trans
If KeyDown(KEY_A) MoveEntity cam,0,0,10
If KeyDown(KEY_Z) MoveEntity cam,0,0,-10
If KeyDown(KEY_LEFT) TurnEntity pivot,0,3,0
If KeyDown(KEY_RIGHT) TurnEntity pivot,0,-3,0
UpdateWorld
RenderWorld
Text 0,10,"Anim seq: "+AnimSeq( mesh )
Text 0,30,"Anim len: "+AnimLength( mesh )
Text 0,50,"Anim time:"+AnimTime( mesh )
Text 0,70,"Transition time (Space)="+trans
Text 0,90,"A/Z: Zoom"
Text 0,110,"Left/Right: Rotate Cam"
Text 0,130,"1-9: Change anim"
Flip
Wend
End
When I change animation my model gets distorted, then if I change again it crashes. Does LoadAnimSeq work differently in miniB3D?
|