I figured the easiest way would be to show it in your code, so here it is with some basic sliding collision:
`Set Up Stuff
SET DISPLAY MODE 1024,768,32
SET WINDOW TITLE "Collision"
HIDE MOUSE
SYNC ON:SYNC RATE 90
`Create and load the media
MAKE OBJECT SPHERE 1,16:COLOR OBJECT 1,RGB(0,255,0)
LOAD OBJECT "MAP.dbo",2
`=======
`Setup the player for collision
sc_setupobject 1,0,1
`Setup the level for collision
sc_setupcomplexobject 2,0,2
`=======
`Main Loop
DO
`=======
`Store the position of the player before moving (needed for sparky's sliding collision)
playeroldx#=object position x(1)
playeroldy#=object position y(1)
playeroldz#=object position z(1)
`=======
`Camera Commands
POSITION CAMERA OBJECT POSITION X(1),OBJECT POSITION Y(1)+500,OBJECT POSITION Z(1)
POINT CAMERA OBJECT POSITION X(1),OBJECT POSITION Y(1),OBJECT POSITION Z(1)
`Function for moving sphere with arrowkeys
MovementControls()
`=======
`Apply basic gravity to the player (we'll need this for going down the ramp)
position object 1,object position x(1),object position y(1)-1,object position z(1)
`Go do collision
gosub Collision
`=======
SYNC
LOOP
`Set up functions
FUNCTION MovementControls()
IF UPKEY()=1 THEN MOVE OBJECT 1,.5
IF DOWNKEY()=1 THEN MOVE OBJECT 1,-.5
IF LEFTKEY()=1 THEN MOVE OBJECT LEFT 1,.5
IF RIGHTKEY()=1 THEN MOVE OBJECT RIGHT 1,.5
ENDFUNCTION
`=======
Collision:
`Store the new position of the player (needed for sparky's)
playernewx#=object position x(1)
playernewy#=object position y(1)
playernewz#=object position z(1)
`Calculate the actual collision
collision=sc_sphereslide(2,playeroldx#,playeroldy#,playeroldz#,playernewx#,playernewy#,playernewz#,8,0)
`If a collision has occured...
if collision>0
`...move the player based on the data sparky's gives us back
position object 1,sc_getcollisionslidex(),sc_getcollisionslidey(),sc_getcollisionslidez()
endif
return
`Here is a random memblock command
`This is needed because sparky's uses the DBP memblocks for some of its stuff
`And if you don't include a memblock command, the memblock dll won't be included
null=memblock exist(1)
`=======
I put everything I added in
`======= lines to make it easier to see.
It's pretty straightforward but if you have any questions please ask.
Oh, and nice models, but you really don't have to offer anything around here, people will help you anyway.