Hi,
When I use ScaleEntity on an Animated Mesh (LoadAnimMesh the mesh becomes unrecognizable :P
Any easy way to fix that? :)
When I use ScaleEntity on an Animated Mesh (LoadAnimMesh the mesh becomes unrecognizable :P
Any easy way to fix that? :)
Import "../minib3d.bmx" Strict Local width=640,height=480,depth=32,mode=2 Graphics3D width,height,depth,mode,0 Local cam:TCamera=CreateCamera() PositionEntity cam,0,10,-15 Local light:TLight=CreateLight() Local ent:TMesh=LoadAnimMesh("media/zombie.b3d") ScaleMesh ent,0.1,0.1,0.1 Local anim_time#=0 ' used by fps code Local old_ms=MilliSecs() Local renders=0 Local fps=0 While Not KeyDown(KEY_ESCAPE) If KeyHit(KEY_ENTER) Then DebugStop ' control camera MoveEntity cam,KeyDown(KEY_D)-KeyDown(KEY_A),0,KeyDown(KEY_W)-KeyDown(KEY_S) TurnEntity cam,KeyDown(KEY_DOWN)-KeyDown(KEY_UP),KeyDown(KEY_LEFT)-KeyDown(KEY_RIGHT),0 If KeyDown(KEY_MINUS) Then anim_time#=anim_time#-0.1 If KeyDown(KEY_EQUALS) Then anim_time#=anim_time#+0.1 SetAnimTime(ent,anim_time#) RenderWorld renders=renders+1 ' calculate fps If MilliSecs()-old_ms>=1000 old_ms=MilliSecs() fps=renders renders=0 EndIf Text 0,0,"FPS: "+fps Text 0,20,"+/- to animate" Text 0,40,"anim_time#: "+AnimTime(ent) Flip Wend End