It is possible to do this with the intersect object command, but it will not result in perfect sliding collision.
Here's a quickexample
sync on
sync rate 0
autocam off
load object "level.x",1
setupComplexObject 1,0,2
load image "1.jpg",1
texture object 1,1
radius# = 5.0
make object sphere 2,radius#*2.0
position object 2,-80,15,-20
gravity# = -0.5
make object plain 3,5,5
rem 0 = first person, 1 = third person
view = 0
do
rem keep movement less than the radius#
if upkey()=1 then move object 2,1
if downkey()=1 then move object 2,-1
if leftkey()=1 then turn object left 2,1
if rightkey()=1 then turn object right 2,1
position object 2,object position x(2),object position y(2)+gravity#,object position z(2)
checkObjectAgainstLevel(2,1,radius#)
positionCameraToObject(2,view)
text 0,0,str$(screen fps())
sync
loop
function checkObjectAgainstLevel(obj,level,sRadius#)
newx# = object position x(obj)
newy# = object position y(obj)
newz# = object position z(obj)
floor = intersectObject(level,0,newx#,newy#,newz#,newx#,newy#-sRadius#,newz#,0)
if floor>0 then newy# = getStaticCollisionY()+sRadius#
xdir = intersectObject(level,0,newx#,newy#,newz#,newx#+sRadius#,newy#,newz#,0)
if xdir>0 then newx# = getStaticCollisionX()-sRadius#
nxdir = intersectObject(level,0,newx#,newy#,newz#,newx#-sRadius#,newy#,newz#,0)
if nxdir>0 then newx# = getStaticCollisionX()+sRadius#
zdir = intersectObject(level,0,newx#,newy#,newz#,newx#,newy#,newz#+sRadius#,0)
if zdir>0 then newz# = getStaticCollisionZ()-sRadius#
nzdir = intersectObject(level,0,newx#,newy#,newz#,newx#,newy#,newz#-sRadius#,0)
if nzdir>0 then newz# = getStaticCollisionZ()+sRadius#
position object obj,newx#,newy#,newz#
endfunction
function positionCameraToObject(obj,thirdPerson)
position camera object position x(2),object position y(2),object position z(2)
rotate camera object angle x(2),object angle y(2),object angle z(2)
if thirdPerson=1
pitch camera down 10
move camera -20
endif
endfunction
if memblock exist(1) then delete memblock 1
The media is attached to this post.
In thirdperson view it is obvious that the sphere tends to cross parts of the level, and you would also be able to fit through very small gaps, created by low ceilings or narrow alleys.
Also you might want to check out some of the sliding collision examples on the code snippets board.