Quote: "Does the terrain demo crash for you? If it does not, start with the Terrain demo and make smaller changes to it until you get to where you want to start at in the code."
No it doesn't, but thanks

I never thought of that

. I'll try doing that now
EDIT: WTF! I have it working, collision was fine, then I made some adjustments, and tried to compile it.
It didn't compile ( my dbpro often does that ...

It just says compiling and does nothing more ). When I reloaded it, ran it, and it said it's stopped working...
sync on:sync rate 60
backdrop on
autocam off
set camera range 0.5,5000
load image "media\map\texture.bmp", 1
load image "media\map\detail.tga", 2
make object terrain 1
set terrain heightmap 1, "media\map\map2.bmp"
set terrain scale 1, 3, 0.6, 3
set terrain split 1, 16
set terrain tiling 1, 4
set terrain light 1, 1, -0.25, 0, 1, 1, 0.78, 0.5
set terrain texture 1, 1, 2
build terrain 1
load object "media\map\skybox2.x", 200
set object light 200, 0
set object texture 200, 3, 1
position object 200, 1000, 2000, 4000
scale object 200, 30000, 30000, 30000
` position the camera
position camera 385,23,100
print "Starting Newton"
sync:sync
NDB_NewtonCreate
NDB_SetVector 1, -2000.0, -1000.0, -2000.0
NDB_SetVector 2, 2000.0, 1000.0, 2000.0
NDB_NewtonSetWorldSize
Print "Newton World Created"
sync
NDB_SetVector 0.0, -50.0, 0.0
NDB_SetStandardGravity
print "making Newton TreeCollision...."
sync
ter = NDB_NewtonMaterialCreateGroupID()
cube = NDB_NewtonMaterialCreateGroupID()
NDB_NewtonMaterialSetCollisionCallback ter, cube
NDB_NewtonMaterialSetDefaultCollidable ter, cube, 1
col = NDB_NewtonCreateTreeCollision( 1, 0 )
Terrain = NDB_NewtonCreateBody ( col )
NDB_NewtonBodySetMaterialGroupID Terrain, ter
col = NDB_NewtonCreateBox( 10,10,10 )
body = NDB_NewtonCreateBody( col )
NDB_BuildMatrix 0, 0, 0, 200, 200, 200
NDB_NewtonBodySetMatrix Body
NDB_NewtonBodySetMassMatrix Body, 1000
NDB_NewtonReleaseCollision Col
make object cube 2,10
NDB_BodySetDBProData Body,2
NDB_BodySetGravity Body, 1
NDB_NewtonBodySetDestructorCallback Body
do
time# = NDB_GetElapsedTimeInSec( )
gosub camera
gosub physics
update terrain
sync
loop
camera:
position camera 0, object position x( 2 ) +150, object position y( 2 ) + 300, object position z( 2 ) + 150
point camera object position x( 2 ), object position y( 2 ), object position z( 2 )
return
physics:
NDB_NewtonUpdate time#
return
if memblock exist(1) = 1
delete memblock 1
endif
EDIT 2:
Nevermind

I fixed it, well, previous versions fixed it

.
I'm new to newton, so how would I go about applying a force to box to make it move?
Also, is there any way to make tree collision faster?
Windows 7 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
