Sytto Posted February 10, 2010 Share Posted February 10, 2010 hey, I was trying to "translate" the introduction to animation tutorial from c++ to bmax, everything is ok but when I get to animate the mesh automatically, I do it correctly (or that's I think) but does not animate, just stands stopped. here's the code Framework leadwerks.engine Graphics 1280,1024 RegisterAbstractPath AppDir If Not CreateWorld() RuntimeError "Hubo un fallo al lanzar la aplicacion" cam:TCamera=CreateCamera() CameraClearColor cam,Vec4(0,0,1,1) MoveEntity cam,Vec3(0,0.85,-2) buffer:TBuffer=CreateBuffer(1280,1024,BUFFER_COLOR0|BUFFER_DEPTH|BUFFER_NORMAL) light:TLight=CreateSpotLight() RotateEntity light,Vec3(20,45,0) EntityColor light,Vec4(2,2,2,1) MoveEntity light,Vec3(0,0,-5) SetShadowMapSize light,1024 AmbientLight Vec3(0.1) mesh:TMesh=LoadMesh("crawler.gmf") While Not KeyHit(KEY_ESCAPE) Animate(mesh,AppTime()/100.0,1.0,0,True) UpdateWorld SetBuffer(buffer) RenderWorld SetBuffer BackBuffer() RenderLights(buffer) Flip() Wend What am i doing wrong ? sorry if the question is rather stupid but im just starting with bmax thanks ^^ Quote Link to comment Share on other sites More sharing options...
Josh Posted February 10, 2010 Share Posted February 10, 2010 Add UpdateAppTime() to the loop. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Sytto Posted February 10, 2010 Author Share Posted February 10, 2010 thank you very much ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.