Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Help with collisions

Author
Message
047
18
Years of Service
User Offline
Joined: 4th Jun 2006
Location:
Posted: 30th Jul 2006 07:41
I'm experimenting with collisions in DB Classic but can't get my program to detect when two objects touch each other unless I use Global Collisions.
I'm using this short program to test collisions:

load object "topball.3ds", 1
load object "topball.3ds", 15

position object 1, 0, -100, 0
set object collision on 1
set object collision on 15
set object collision to spheres 1
set object collision to spheres 15

a = 50

do

position object 15, 0, a, 0
if upkey() = 1 then a = a + 1
if downkey() = 1 then a = a - 1
if object collision(1, 15) = 1 then end

loop

I don't want to use Global Collision because in my real program there are many more objects on the screen and the game literally stops running. Can anyone tell me what I'm doing wrong here?

Thanks!!!
047
18
Years of Service
User Offline
Joined: 4th Jun 2006
Location:
Posted: 30th Jul 2006 10:47 Edited at: 30th Jul 2006 11:38
After a few hrs break from my original message I turned my computer back on and tried the same program with no changes at all and it worked. The collision was detected.
I thought the problem was gone however when I tried to use the same test program within my real program (as a separate loop at the beginning of the program) I didn't work anymore.
If anyone can offer any advise I'll really appreciate it.
Thanks!

Login to post a reply

Server time is: 2024-11-27 12:35:13
Your offset time is: 2024-11-27 12:35:13