Jump to content

Recommended Posts

Posted

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 ^^

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...