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 / Spherical Collision problems

Author
Message
BLink
20
Years of Service
User Offline
Joined: 1st Jan 2004
Location: Laptop, wherever that is
Posted: 31st Jul 2006 19:09 Edited at: 19th Aug 2006 00:57
I'm really not sure what's wrong, but for some reason this code just isn't working...the "bomb" appears when you right click, and it's supposed to destroy( read: hide) the small gray spheres. Can someone just take a look at this and see what's wrong?



Thanks!

EDIT: DBC btw.

Pineapple juice, the best drink ever made.
Crit
18
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 31st Jul 2006 20:07 Edited at: 31st Jul 2006 20:36
if object collision(bomb#+201,0)>0 and object collision(bomb#+201,0)<21 then hide object bomb#+201

[edit] nevermind, that won't work...

CHESS ENCOUNTER
Demo
WIP
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 1st Aug 2006 05:05
Maybe it's the scaling for the bomb...

Crit
18
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 1st Aug 2006 15:44 Edited at: 1st Aug 2006 15:45
You need to check collision of each object in a for-next loop



CHESS ENCOUNTER
Demo
WIP
BLink
20
Years of Service
User Offline
Joined: 1st Jan 2004
Location: Laptop, wherever that is
Posted: 10th Aug 2006 17:55
The problem still seems to exist, even in your code Crit.

I've transfered it to box collisions now, as I thought that would be easier, but...



...still broken.

Pineapple juice, the best drink ever made.
Crit
18
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 10th Aug 2006 22:52 Edited at: 10th Aug 2006 22:53
Really? That code worked for me. At least I think it did... The bomb exploded and took out the first 10 or so circles as the explosion grew. What is supposed to happen? BTW, I tried it in DB Pro.

edit: by "that code", I mean the code I posted, not the box collision code you posted.

CHESS ENCOUNTER
Demo
WIP
BLink
20
Years of Service
User Offline
Joined: 1st Jan 2004
Location: Laptop, wherever that is
Posted: 11th Aug 2006 05:23
It does work that way, but that's not the right way for it to work. It should destroy spheres as it comes to them, while instead, with the collision of the first, it destroys all that it's going to eventually destroy. Slow down the framerate and see for yourself, it's weird.

Pineapple juice, the best drink ever made.
BLink
20
Years of Service
User Offline
Joined: 1st Jan 2004
Location: Laptop, wherever that is
Posted: 18th Aug 2006 19:11 Edited at: 19th Aug 2006 00:58


I've cut down to the basics again, because I need to figure out this problem before moving on to collision boxes, since at least in this form the spheres can be collided with(unlike collision boxes), even though wrongly done. The bomb now destroys all the spheres though, so I don't really understand what's going on anymore...not that I ever did

EDIT: DBC btw.

Pineapple juice, the best drink ever made.

Login to post a reply

Server time is: 2024-11-26 14:42:03
Your offset time is: 2024-11-26 14:42:03