Well, I looked in the collision resource, and all of the codes either didn't work for me (Not proper files and paths, I have a clean install of DBPRo), or don't work like I need them to.
The one I am using (
`Setup the game
SYNC ON:SYNC RATE 0:AUTOCAM OFF:HIDE MOUSE
`Make a player object
MAKE OBJECT SPHERE 1, 10
Color Object 1, RGB(255, 255, 0)
SET OBJECT COLLISION ON 1
`Make a matrix, its only for a visual aspect, and doesnt effect collision at all.
MAKE MATRIX 1,1000,1000,10,10
POSITION MATRIX 1,-500,0,-500
`Make an object to collide with
MAKE OBJECT BOX 2,100,200,300
POSITION OBJECT 2,200,0,500
SET OBJECT COLLISION ON 2
`Main loop
DO
`Make a really bad gravity simulation
Move object down 1, 0.1
`Store the object's old position, so we can move them
`back to it if we detect a collision
ox# = OBJECT POSITION X(1)
oy# = OBJECT POSITION Y(1)
oz# = OBJECT POSITION Z(1)
`Third person cam code
POSITION CAMERA ox#+10,oy#+20,oz#+5
POINT CAMERA ox#, oy#, oz#
MOVE CAMERA -50
`Handle object movement
if upkey()=1 then move object 1, 0.3
if downkey()=1 then move object 1, 0.3
if rightkey()=1 then turn object right 1, 0.3
if leftkey()=1 then turn object left 1, 0.3
IF OBJECT COLLISION(1,2) THEN POSITION OBJECT 1, ox#,oy#,oz#
`Refresh the screen
SYNC
`Repeat
LOOP
) works okay for walls, but automatically gets stuck and can't move without rotating if it hits a wall, and if it touches a floor, it won't move at all.
My gravity code is simply "Move object down 1, 0.1".
It would be great if people could help me get some nice well-working collision that works for the Y axis too, and doesn't lock the player's feet in unless it turns completely around.
EDIT:
Got a floor working!
I made this code for the floor:
move object down 1, 0.98
If object collision(1, 6) then move object up 1, 0.098
This is odd - The floor collision works great, but the others do not. The reversed movement made a great solution for the floor. However, it sucks in the player if it is a wall.
So basically, I have the Y axis working, I need to get the Z and X axises running.
The Person99 awards go to: 1. Jack the Ripper for hardest crime scenes. 2. Peter Petrelli for most powers. 3. Superman for longest flight.