Hi Daniel W. Try this piece of code with your level...I`m sure you'll be able to adjusted .
autocam off
sync on
sync rate 60
set camera range 0.01,30000
hide mouse
load object "level.dbo", 2
load image "dirt.jpg",1
load image "name.bmp",2
set light mapping on 2,1
scale object 2,300,300,300
fix object scale 2
sc_setupcomplexobject 2, 1, 2
`making another object into our level and setup collisions
make object box 3,30,1,200
position object 3,-278,30,-15
xrotate object 3,-20
texture object 3,2:scale object texture 3,1,10:yrotate object 3,180
sc_setupcomplexobject 3, 1, 2
make object sphere 1, 5
position object 1, 5, 5, 5
color object 1, RGB(0, 255, 0)
hide object 1
do
rem first save the original position
oldx# = object position x(1)
oldy# = object position y(1)
oldz# = object position z(1)
if upkey()then move object 1, 2
if downkey()then move object 1, -2
if leftkey() then move object left 1, 2
if rightkey() then move object right 1, 2
rem add simple gravity
speedY# = speedY#-0.5
position object 1,object position x(1),object position y(1)+speedY#,object position z(1)
rem after moving check for sliding collision
X# = object position x(1)
Y# = object position y(1)
Z# = object position z(1)
coll = sc_sphereslide(0,oldx#,oldy#,oldz#,X#,Y#,Z#,10,0)
if coll>0
rem get sliding collision position
newX# = sc_getcollisionslideX()
newY# = sc_getcollisionslideY()
newZ# = sc_getcollisionslideZ()
position object 1,newX#,newY#,newZ#
rem reset gravity up to a certain slope
nY# = sc_getcollisionnormalY()
if nY#>0.707 `about 45 degrees
speedY# = 0
`jumping
if spacekey() then speedY# = 5
endif
endif
X# = object position x(1)
Y# = object position y(1)
Z# = object position z(1)
position camera X#, Y#+10, Z#
`camera moving
a#=wrapvalue(a#+mousemovex()/2)
cam#=wrapvalue(cam#+mousemovey()/2)
`camera limits
if cam#<=290 and cam#>180 then cam#=290
if cam#>=70 and cam#<180 then cam#=70
rotate camera cam#,a#,0
yrotate object 1,a#
sync
loop
delete memblock 1
Perhaps you will have to use different level scale
Cheers.
I'm not a grumpy grandpa
