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.

DarkBASIC Discussion / collision problem

Author
Message
eek
20
Years of Service
User Offline
Joined: 26th Dec 2004
Location:
Posted: 30th Jul 2006 09:53 Edited at: 30th Jul 2006 09:55
Hiya,
I'm just trying to make a breakout clone at the moment and I have a problem with the ball and box collision. The first time the ball goes through the box, it stays but then when it bounces back it hides it correctly. The second box works fine. I'm not sure how that's possible with the code. Anyways, here's the portion that's messed up:



Thanks!
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 2nd Aug 2006 10:21
ok i found/fixed your problem. Don't ask me why it wasn't working, because i don't know. Sometimes dbc's 3d collision detection doesn't work for no reason at all.

anyway, here is your updated game loop with 2 changes

1. the ball turns around when it hits the bricks
2. the ball hits the bricks the first time

eek
20
Years of Service
User Offline
Joined: 26th Dec 2004
Location:
Posted: 3rd Aug 2006 01:43
Alrighty, thanks for the fix! I'm still curious as to why it didn't work before, but I guess it will be a mystery forever...

Thanks again!

Login to post a reply

Server time is: 2025-05-25 08:23:52
Your offset time is: 2025-05-25 08:23:52