has anyone else had trouble with the "ndb_getcollisionbodytobody()" command? i can't seem to get it to return a value, no matter what i try... here's some quick code i threw together to test it:
sync on
sync rate 60
ndb_newtoncreate
ndb_setvector 1,0,-10,0
ndb_setstandardgravity
world=ndb_newtonmaterialcreategroupid()
player=ndb_newtonmaterialcreategroupid()
ndb_newtonmaterialsetdefaultfriction world,player,0.5,0.5
col=ndb_newtoncreatesphere(1,1,1)
body=ndb_newtoncreatebody(col)
ndb_newtonreleasecollision col
ndb_calculatemispheresolid 10.0,1
ndb_newtonbodysetmassmatrix body,10.0
make object sphere 1,1.0
ndb_bodysetdbprodata body,1
ndb_newtonbodysetmaterialgroupid body,player
ndb_buildmatrix 0,0,0,0,50,0
ndb_newtonbodysetmatrix body
`ndb_newtonbodysetautofreeze body,0
ndb_bodysetgravity body,1
ndb_setvector 5,1,5
ndb_newtonbodysetvelocity body
col=ndb_newtoncreatebox(100,1,100)
level=ndb_newtoncreatebody(col)
ndb_newtonreleasecollision col
ndb_newtonbodysetmassmatrix level,0
make object box 2,100,1,100
color object 2,rgb(55,100,245)
ndb_bodysetdbprodata level,2
ndb_newtonbodysetmaterialgroupid level,world
`ndb_buildmatrix 0,0,0,0,-10,0
`ndb_newtonbodysetmatrix level
position camera 20,10,10
point camera 0,0,0
do
point camera object position x(1),object position y(1),object position z(1)
set cursor 10,10
print "col: "+str$(ndb_getcollisionbodytobody(level,body))
ndb_newtonupdate ndb_getelapsedtimeinsec()
sync
loop
formerly xMik