this is some collision code i came up with the intersect object command.Its simple but it works amazingly,i have not managed to beat atall and its totaly smooth.theres also a good fps.
heres the code but i cant upload the model so have to use your own model,soz.any model should work.
plz tell me if you mange to beat the collision thanx
here it is
DDG
load object "level1.x",1
set ambient light 100
px#=-200
pz#=400
push#=30
dim dist#(12)
make camera 1
do
hide mouse
pay#=camera angle y(1)
pax#=camera angle x(1)
if upkey()=1
px#=newxvalue(px#,pay#,5)
pz#=newzvalue(pz#,pay#,5)
endif
if downkey()=1
px#=newxvalue(px#,pay#,-5)
pz#=newzvalue(pz#,pay#,-5)
endif
position camera 1,px#,py#,pz#
mmx#=mousemovex()
yrotate camera 1,pay#+mmx#
mmy#=mousemovey()
xrotate camera 1,pax#+mmy#
for x =1 to 12
colx#=newxvalue(px#,22.5*x,1000)
colz#=newzvalue(pz#,22.5*x,1000)
dist#(x)=intersect object(1,px#,0,pz#,colx#,0,colz#)
if dist#(x) > 0 and dist#(x) < 30
back#=30-dist#(x)
px#=newxvalue(px#,22.5*x-180,back#)
pz#=newzvalue(pz#,22.5*x-180,back#)
position camera px#,0,pz#
endif
next x
if dist#=0 then dist#=9999
ink 1,1
print "distance from wall: "+str$(dist#(1))
text 0,0,"fps : "+str$(screen fps())
rem endmovement
loop
-------DDG-------