Hallo Twinsen...of course ...we have the intersect comand and with just that, I made something like sparky`s dll .
Read carefully the code and try to understand it... good luck
// CHAFARI COLLISION SYSTEM.
// SOME BUGS BUT WORKS FAIR(OK FOR MOST CASES)
//.................................................
sync on:sync rate 30:autocam off:set global collision off
esn=1:pj=2
x as float :y as float :z as float :v as float
c#=0.2 `cantidad que nos desplazamos lateralmente
` cargo el escenario
load object "ps3.x",esn
position object 1,0,-2,0
` Creo el personaje
make object sphere pj,3
v=object size(pj)
position object pj,0,5,0
`ocultamos la esfera de colision del personaje
hide object pj
do
` Muevo al personaje
if upkey() then move object pj,0.2
if downkey() then move object pj,-0.2
gr=wrapvalue(gr+mousemovex()/2)
gr2=wrapvalue(gr2+mousemovey()/2)
rotate camera gr2,0,0
yrotate camera gr
yrotate object pj,gr
x=object position x(pj):y=object position y(pj):z=object position z(pj)
` Calculo las distancias de colisiĆ³n, coordenada X
if INTERSECT OBJECT(esn,x,y,z,x+v,y,z)>0 then x=x-(v-INTERSECT OBJECT(esn,x,y,z,x+v,y,z))
if INTERSECT OBJECT(esn,x,y,z,x-v,y,z)>0 then x=x+(v-INTERSECT OBJECT(esn,x,y,z,x-v,y,z))
` Calculo las distancias de colision, coordenada Z
if INTERSECT OBJECT(esn,x,y,z,x,y,z+v)>0 then z=z-(v-INTERSECT OBJECT(esn,x,y,z,x,y,z+v))
if INTERSECT OBJECT(esn,x,y,z,x,y,z-v)>0 then z=z+(v-INTERSECT OBJECT(esn,x,y,z,x,y,z-v))
`calculo las distancia con el suelo(cordenada y)
if INTERSECT OBJECT(esn,x,y,z,x,y-v,z)>0 then y=y+(v-INTERSECT OBJECT(esn,x,y,z,x,y-v,z))/3
`la gravedad es mallor si no estamos pisando nada
if INTERSECT OBJECT(esn,x,y,z,x,y-v,z)=0 then gravedad#=0.8 else gravedad#=0.25
`nos desplazamos lateralmente a la izquierda
if leftkey()=1 THEN x=NEWXVALUE(x,gr-90,c#)
if leftkey()=1 then z=NEWZVALUE(z,gr-90,c#)
`nos desplazamos lateralmente a la derecha
if rightkey()=1 THEN x=NEWXVALUE(x,gr-90,-c#)
if rightkey()=1 then z=NEWZVALUE(z,gr-90,-c#)
position object pj, x, y-gravedad#, z
position camera x,3+ y-gravedad#,z
sync
loop
oh my god