Here is one slightly modified from the Forum here. It is setup for NGC V3.01 don't forget to inclue the NGCollision.dba in your project and put the NGCollision.dll in the same folder as your .exe
`set display mode
set display mode 1024,768,32 : sync on :sync rate 75
`start collision system gathering info
StartCollisionPRO(000000000,000000000,000000000)
`set collision system to debug mode
StartCollisionDebugPRO()
`set exclusive mode to 0
SetCollisionExclusive( 0 )
`set octree optimization if needed
SetOctreeBuild( 1 )
`set octree threshold if needed
SetOctreeThreshold( 12 )
`set constants to make program easier to read
#Constant TYPE_NGC_ELLIP=1
#Constant TYPE_NGC_MESH=2
#Constant ELLIP_2_ELLIP=1
#Constant ELLIP_2_POLY=2
#Constant RESP_STICK=1
#Constant RESP_SLIDE=2
#Constant RESP_SLIDE_NO_SLOPES=3
#Constant RESP_SLIDE_NO_GRAV=4
#Constant RESP_SLIDE_NO_ACCEL=5
#Constant RESP_NONE=6
#Constant DYN_NO_RESP=1
#Constant DYN_RESP=2
#Constant DYN_RESP_NOTURN=3
#Constant Auto_Priority=0
#Constant Type_Player=1
#Constant Type_Wall=2
rem set collision types
SetCollisionsPRO(Type_Player, Type_Wall, ELLIP_2_POLY, RESP_SLIDE, DYN_NO_RESP,Auto_Priority )
`make floor just so you can see where you are going
make object box 3, 1000,1,1000
position object 3, 500, -1, 500
set object wireframe 3,1
rem make player
make object cube 1,10
position object 1,100,100,500
`set wireframe on so you can see colision on the other side
set object wireframe 1,1
rem make obstacles
make object box 2,400,40,40
position object 2,500,-2,500
`set wireframe on so you can see colision on the other side
set object wireframe 2,1
position camera 400,100,0
`set the objects to a collision type
CollisionTypePRO( 1,Type_Player)
CollisionTypePRO( 2,Type_Wall)
CollisionTypePRO( 3,Type_Wall)
rem set radius for player as it is being used as an ellip collision
SetObjRadiusPRO(1,object size x(1)/2,object size y(1)/2,object size z(1)/2)
`set object gravity
SetObjGravityPRO( 1, 1 )
do
rem control player
if upkey()=1 then move object 1,3
if downkey()=1 then move object 1,-3
if leftkey()=1
turn object left 1,2
endif
if rightkey()=1
turn object right 1,2
endif
`update collision system and object positions
RunCollisionPRO()
`follow cam code
set camera to follow object position x(1),object position y(1),object position z(1),0,100,100,10,0
point camera object position x(1),object position y(1),object position z(1)
`draw changes to the screen
sync
loop