Actually I'm finding that just about any collision object I'm trying to set up now will collide with the ground and then start slowly sinking into it. But I didn't have the problem with spheres. I read something about this that someone posted a while back,
http://forum.thegamecreators.com/?m=forum_view&t=95977&b=1
Unfortunately mine didn't magically work when doing what was suggested in that thread, I was already doing it.
function MakeConvexHull(x#,y#,z#,rx#,ry#,rz#,mass#)
`Step 1- Load in an object to be used to create the convex hull collision data. in this case, this is also our
` visual object, but this might not always be the case. if you want to use a different object for creating
` the convex hull, just delete it after making the convex hull data.
obj = FreeObject()
load object "Model/bowlpinGREEN/BowlPinGREENtest.x", obj
`Step 2- Here's where we create the convex hull collision data. Just tell it the object number,
` and you're good to go! it's saved in "Col" like any other collision data (Box, Sphere, etc)
Col = NDB_NewtonCreateConvexHull( obj )
`Step 3- make the rigid body as normal, from the Collision data.
Body = NDB_NewtonCreateBody(Col)
`Step 4- we must set the mass, and Moment of Inertia, like any other body. in general, I use the size of the
` object, and Box MI, which produces pretty good results.
sx# = object size x(obj)
sy# = object size y(obj)
sz# = object size z(obj)
NDB_CalculateMIBoxSolid mass#, sx#, sy#, sz#
NDB_NewtonBodySetMassMatrix Body, mass#
NDB_NewtonReleaseCollision Col
`Set initial position and rotation
NDB_BuildMatrix rx#, ry#, rz#, x#, y#, z#
NDB_NewtonBodySetMatrix Body
NDB_NewtonBodySetDestructorCallback Body
NDB_BodySetDBProData Body, obj
position object obj, x#, y#, z#
NDB_BodySetGravity Body, 1
endfunction Body
I can't see what I could possibly be doing wrong.