; Animation sequences by name (ArcBasic extensions) ; Space plays the next animation, Escape quits Graphics3D 640,480 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,.6,-2 CameraClsColor camera,150,200,240 light=CreateLight() RotateEntity light,45,30,0 ; a Kenney character (www.kenney.nl, CC0) with its animations built in hero=LoadAnimMesh("../../../media/kenney/mini-characters/character-knight.glb") TurnEntity hero,0,180,0 ; play the animation called "walk" Animate hero,1,.5,FindAnimSeq(hero,"walk") While Not KeyDown(1) If KeyHit(57) ; step through every animation the model has seq=(AnimSeq(hero)+1) Mod CountAnimSeqs(hero) Animate hero,1,.5,seq,6 EndIf UpdateWorld RenderWorld Text 0,0,"Animation "+AnimSeq(hero)+" of "+CountAnimSeqs(hero)+": "+AnimSeqName$(hero,AnimSeq(hero)) Text 0,15,"Space: next animation" Flip Wend End