Ok, after some tests I decided to post to ask help!
I have made a little sphere with DeleD, exported as .obj file.
I converted it with the tool obj2gmf.exe and I got my .gmf sphere loaded in my program. Everything is ok
Now I want to make 'active' its own physic body - I really dont' understand if obj2gmf creates or not the physic body (from my test - with DebugPhysics(True) it is 'red', but present).
I replaced my 'sphere.gmf' with 'oildrum.gmf' and everything works as expected.
What I miss?
I need to use some other tools?
'Use the Leadwerks Engine module as our base
Framework leadwerks.engine
'Create an OpenGL graphics window
Graphics 800, 600
'Allows the engine to find files and load files from zip packages
RegisterAbstractPath AppDir
'Create a world
If Not CreateWorld() RuntimeError "Failed to create world."
'Create a camera
cam:TCamera = CreateCamera()
CameraClearColor(cam, Vec4(0, 0, 1, 1))
MoveEntity cam, Vec3(0, 0, - 5)
'create a ligt
light:TLight = CreateDirectionalLight()
RotateEntity(light, Vec3(65, 45, 0))
'Create a render Buffer
buffer:TBuffer = CreateBuffer(800, 600, BUFFER_COLOR | BUFFER_DEPTH | BUFFER_NORMAL)
body:TBody = CreateBodyBox()
SetBodyMass(body, 1)
mesh:TMesh = CreateCube()
EntityParent(mesh, body)
PositionEntity(body, Vec3(0, 2, 0))
body2:TBody = CreateBodyBox()
SetBodyMass(body2, 1)
mesh:TMesh = CreateCube()
EntityParent (mesh, body2)
PositionEntity(body2, Vec3(0.5, 5, 0))
DebugPhysics(True)
ground:TBody = CreateBodyBox(10, 0.1, 10)
groundmesh:TMesh = CreateCube()
ScaleEntity(groundmesh, Vec3(10, 0.1, 10))
EntityParent(groundmesh, ground)
PositionEntity (ground, Vec3(0, - 1, 0))
Local ball:tmodel=LoadModel("abstract::sphere.gmf")'oildrum.gmf")
PositionEntity ball,vec3(.5,2,0)
'ScaleEntity ball,vec3(0.1,.1,.1) '--> too big?
EntityType ball, 1
SetBodyMass ball, 12
Collisions(1, 1, 1)
EntityType(body, 1)
EntityType(body2, 1)
EntityType(ground, 1)
'Main loop
While Not KeyHit(KEY_ESCAPE)
'Update timing, physics, and other miscellaneous updates
UpdateWorld
'Draw the world
SetBuffer(buffer)
RenderWorld
'render lighting
SetBuffer(BackBuffer())
RenderLights(buffer)
'Swap the graphics buffers so we can see what we drew
Flip
Wend
Thank you
Cheers