Hello, USING DBC 1.13 Enhanced
I am new and want to make a simple collision of 2 boxes to get the hang of collision. I was hoping to achieve this myself but after 5 hours of researching I am breaking down and asking foe your guys help
I've read all about the Nuclear collision DLL and all the fancy sliding collision and maybe someday I will be that advanced to care.
BUT I JUST WANT THE CAMERA TO STOP WHEN IT HITS THE STUPID BOX IN THE CENTER OF MY MATRIX! heh sorry. If anyone could help me out here It would be appreciated much! Thank you!
P.S Theres a texture I loaded for the ground which I'm betting you don't have to just ignore it
~Source Code has been added below~
MAKE MATRIX 1,1000,1000,20,20
MAKE OBJECT BOX 1,2,3,2
MAKE OBJECT BOX 2,20,15,35:POSITION OBJECT 2,200,5,200
LOAD IMAGE "c:\darkbasic\cement.bmp",1
PREPARE MATRIX TEXTURE 1,1,1,1
POSITION CAMERA 0,2,0
SYNC ON
SYNC RATE 50
HIDE OBJECT 1
HIDE MOUSE
DO
POSITION OBJECT 1,camx,camy,camz
camx=CAMERA POSITION X():camy=CAMERA POSITION Y():camz=CAMERA POSITION Z()
if leftkey()=1 then turn camera left 3
if rightkey()=1 then turn camera right 3
if upkey()=1 then move camera 0.5
if downkey()=1 then move camera -0.5
if spacekey()=1 then camy=camy+10
rem position camera camx,camy,camz
hit=OBJECT COLLISION(2,1)
while hit=1
camz=-1
camz=-1
endwhile
SYNC
LOOP
~Falling Down~