The DLL is designed to go over things such as steps, etc., automatically.
I found a problem in the code. A variable "y" was used to set the object's Y position instead of "y#" so the object was trying to be placed at the Y position of 0 constantly. This simulated a massive amount of gravity so the object couldn't go over anything.
I also put in a bit of code that switched gravity on/off based on the Y normal of the last hit surface. This allows you to collide with a steep slope and slide up it easier as gravity is turned off. And if you're floating, gravity is turned back on.
Here's the complete code:
sync on
autocam off
set ambient light 50
make light 1
rotate light 1,40,30,0
#Constant ELLIP_2_POLY=2
#Constant RESP_SLIDE=2
#Constant DYN_NO_RESP=0
StartCollisionPRO()
StartCollisionDebugPRO()
#Constant TYPE_CAM = 1
#Constant TYPE_WORLD = 2
SetCollisionsPro( TYPE_CAM,TYPE_WORLD,ELLIP_2_POLY,RESP_SLIDE,DYN_NO_RESP )
load object "t3.x",2
scale object 2,20000,20000,20000
set object wireframe 2,1
CollisionTypePRO( 2, TYPE_WORLD )
make object cube 1,50
position object 1,-1000,1000,100
CollisionTypePRO( 1, TYPE_CAM )
SetObjRadiusPRO( 1, 50,50,50)
distance# = 100
height# = 100
smooth# = 20
do
if leftkey() then turn# = curvevalue(-10.0,turn#,10.0)
if rightkey() then turn# = curvevalue(10.0,turn#,10.0)
if upkey() then move# = curvevalue(20.0,move#,20.0)
if downkey() then move# = curvevalue(-20.0,move#,20.0)
move object 1,move#
yrotate object 1,wrapvalue(object angle y(1)+turn#)
turn# = curvevalue(0.0,turn#,20.0)
move# = curvevalue(0.0,move#,20.0)
x# = object position x(1)
y# = object position y(1)
z# = object position z(1)
a# = object angle y(1)
set camera to follow x#,y#,z#,a#,distance#,height#,smooth#,0
point camera x#,y#,z#
grounded=0
for colls = 1 to CountCollisionsPRO(1)
if CollisionHitNormY( 1, colls ) > 0.3
grounded=1
break
endif
next colls
if grounded=0
y#=y#-2
endif
position object 1,x#,y#,z#
`endif
RunCollisionPRO()
sync
loop
I also turned wireframe mode on for the landscape so I could see it.