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 Professional Discussion / Polygon to Polygon collision

Author
Message
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st Feb 2003 00:12
Here is the situation: I have a tunnel shape (ie semi-cylinder) through which an object needs to travel.

Obviously box collision doesn't work because a collision is registered even if the object is going straight through the center of the tunnel and no collision is actually occuring (the object is much smaller than the tunnel is wide or tall). I have tried both intersect object and SET OBJECT COLLISION TO POLYGONS. I need to find a way that collision is registered if the ball hits the sides or top of the tunnel but not if it is just going through the middle of it.

Does anyone have any ideas on how I could do this?

(Help will be greatly appreciated )
NOBODY has a forum name as stupid as Darth Shader. I do.
UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 21st Feb 2003 01:06
why doesn't SET OBJECT COLLISION TO POLYGONS work?

Life is a terminal disease.
You never survive it.
BackBONE
22
Years of Service
User Offline
Joined: 18th Feb 2003
Location:
Posted: 21st Feb 2003 01:56
hey darkfluff

if you had read what darth wrote
you wouldnt post like this :-(

Ok.

One way is to set object collision off for the tunnel
so its just for the optix.
Then create boxes and place them on the sides and the top of the tunnel.
Hide those boxes and check the collisions with it.
Its a little more work but thats the way life goes...

see ya
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 21st Feb 2003 01:58
its a good idea if your tunnel happens to have some flat-ish sie

xxxpetratxxx
B. R. W
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 21st Feb 2003 01:58
*its a good idea if your tunnel happens to have some flat-ish sides

xxxpetratxxx
B. R. W
TheCyborg
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 21st Feb 2003 02:17
You cold also make the tunnel an object (.X or something).
I think that will work.

TheCyborg Development.
http://TheCyborg.Amok.dk
The Ultimate Source To DarkBASIC Programming.
gamefreaks
22
Years of Service
User Offline
Joined: 17th Feb 2003
Location: United Kingdom
Posted: 21st Feb 2003 02:39
Yeah, If you are using polygon detection on .x objects, then I wont report a collision if you are not actually touching a polygon even on the inside.

Just for the road, I was using a boolean operation in Studio Max, to create the tunnel.

I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day.
randi
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United States
Posted: 21st Feb 2003 04:50
If it's a straight tube it shouldn't be too hard to figure it all out with math, and not use any DB collision.

Randi
rapscaLLion
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 21st Feb 2003 05:27
Ya, figure out were the center of the cylinder is, then you use a simple distance calculation to find the distance between your object and the outer edge. If your distance is greater than the circle's diameter, it's obviously outside

Alex Wanuch
aka rapscaLLion
Kousen Dev Progress >> Currently Working On Editors
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st Feb 2003 23:38
Thanks, I was just wondering if there was any way of doing it using DBPs collision commands that I had overlooked, seems not so I will use maths instead

NOBODY has a forum name as stupid as Darth Shader. I do.

Login to post a reply

Server time is: 2025-05-18 21:19:11
Your offset time is: 2025-05-18 21:19:11