There you go:
Rem Prepare DBPro
Autocam Off
Sync On : Sync Rate 34
Rem Prepare Newton
NDB_NewtonCreate
NDB_NewtonSetMinimumFrameRate 200
Rem Create Newton world borders
world_Size# = 1000.0
NDB_SetVector 1, world_Size#*-1, world_Size#*-1, world_Size#*-1
NDB_SetVector 2, world_Size#, world_Size#, world_Size#
NDB_NewtonSetWorldSize
Rem Destroy newton body if it leaves the world borders
NDB_NewtonSetBodyLeaveWorldEvent 1
Rem Define Gravity
NDB_SetVector 0.0, -988.0, 0.0
NDB_SetStandardGravity
Rem Make a Floor
`Visual Object
Make Object Box 1, 1000.0, 10.0, 1000.0
`Newton Object Create
col = NDB_NewtonCreateBox(1000.0, 10.0, 1000.0)
bod = NDB_NewtonCreateBody(col)
NDB_NewtonReleaseCollision col
`Newton Object Position
NDB_BuildMatrix 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
NDB_NewtonBodySetMatrix bod
`Newton object mass (0 mass in this case because we dont want other objects to push this one)
NDB_NewtonBodySetMassMatrix bod, 0.0
`Link visual and newton objects
NDB_BodySetDBProData bod, 1
Rem Make the falling box
`Visual Object
Make Object Cube 2, 50.0
`Newton Object Create
col = NDB_NewtonCreateBox(50.0, 50.0, 50.0)
bod = NDB_NewtonCreateBody(col)
NDB_NewtonReleaseCollision col
`Newton Object Position
NDB_BuildMatrix 0.0, 0.0, 0.0, 0.0, 200.0, 0.0
NDB_NewtonBodySetMatrix bod
`Newton object mass and inertial values (mass is 200.0)
NDB_CalculateMIBoxSolid 200.0, 50.0, 50.0, 50.0
NDB_NewtonBodySetMassMatrix bod, 200.0
`Link visual and newton objects
NDB_BodySetDBProData bod, 2
NDB_NewtonBodySetDestructorCallback bod
REM MAKE THIS OBJECT EFFECTED BY GRAVITY
NDB_BodySetGravity bod, 1
Rem Position camera for a scenic view
Position Camera 0, 50, -450
Rem reset newton timer
tmr# = NDB_GetElapsedTimeInSec()
tmr# = NDB_GetElapsedTimeInSec()
Do
Rem Update newton
tmr# = NDB_GetElapsedTimeInSec()
NDB_NewtonUpdate tmr#
Sync
Loop
Rem Destroy newton
NDB_NewtonDestroy
End
There is always one more imbecile than you counted on.