I had good results implementing ODE in a small program, but then I got some weird results in the editor. The object flies off to the side, or up, and then behaves normally once it slows down or lands. It's as if there is an existing object it is colliding with, but there is only one object.
This code might look a little different from most Blitz code, but you can see what it does:
This code might look a little different from most Blitz code, but you can see what it does:
Case MENU_FITBOX If CURRENTSTATICMESHREFERENCE PokeInt CURRENTSTATICMESHREFERENCE,STATICMESHREFERENCE_COLLISIONMETHOD,1 RenderBrowserStaticmeshDisplay() body=ODE_dBodyCreate() geom=ODE_dCreateBox(PHYSICSWORLD,ODE_SCALE*StaticMeshReferenceWidth(CURRENTSTATICMESHREFERENCE),ODE_SCALE*StaticMeshReferenceHeight(CURRENTSTATICMESHREFERENCE),ODE_SCALE*StaticMeshReferenceDepth(CURRENTSTATICMESHREFERENCE),1) ODE_dGeomSetBody geom,body ODE_dBodySetPosition body,ODE_SCALE*StaticMeshReferenceCenterX(CURRENTSTATICMESHREFERENCE),ODE_SCALE*StaticMeshReferenceCenterY(CURRENTSTATICMESHREFERENCE),ODE_SCALE*StaticMeshReferenceCenterZ(CURRENTSTATICMESHREFERENCE) ODE_dBodySetMass body,10 ODE_dBodySetLinearVel(body,0,0,0) PokeInt CURRENTOBJECT,OBJECT_ODE_BODY,body PokeInt CURRENTOBJECT,OBJECT_ODE_GEOM,geom EndIf