Hello guys, i'm using the Newton Wrapper 1.53 but i'm having some troubles: objects fall by the gravity, but when they hit the level they just decelerate and after some frames they gets through.
Here is the code i'm using for download the level
objWorld = FreeObject()
load object "media\levels\ndb.dbo", objWorld
Col = NDB_NewtonCreateTreeCollision( objWorld )
Room = NDB_NewtonCreateBody( Col )
NDB_BodySetDBProData Room, objWorld
NDB_NewtonBodySetDestructorCallback Room
NDB_NewtonReleaseCollision Col
and here'is my function for make a box
function ENT_makeBox(sizex,sizey,sizez,x,y,z,anglex,angley,anglez)
i = ENT_crea()
obj = ENT_getObjID(i)
make object box obj,sizex,sizey,sizez
position object obj, x,y,z
rotate object obj, anglex,angley,anglez
collIndex = NDB_NewtonCreateBox( sizex,sizey,sizez )
Body = NDB_NewtonCreateBody( collIndex )
arrEntita(i).bodyID = Body;
NDB_BuildMatrix object angle x(obj), object angle y(obj), object angle z(obj) , object position x(obj) , object position y(obj)-size, object position z(obj)
NDB_NewtonBodySetMatrix Body
mass# = 50
NDB_CalculateMIBoxSolid mass#, size, size, size
NDB_NewtonBodySetMassMatrix Body, mass#
NDB_NewtonReleaseCollision collIndex
NDB_BodySetDBProData body, obj
NDB_NewtonBodySetDestructorCallback Body
NDB_BodySetGravity Body, 1
endfunction i
Sorry my bad english
