Archived

This topic is now archived and is closed to further replies.

Crippen

Frustration, frustration!

Recommended Posts

Crippen    122
I'm having so much trouble trying to detect collisions between two simple triangle polygons. Resource after resource on the net explains so much mumbo jumbo to me about Ellipsoids, camera with polygons and how to react but none actually explain quite simply, how to detect if two simple polygons have colided and where on the face the contact was made. I mean, everyone is telling me stuff I already know, but no body seems to know how to detect the collision itself polygon to polygon. Am I wrong? I don't want to use I_COLLIDE and all those precompiled libraries. I want to actualy know how I_COLLIDE, etc did it. Mabye I'm asking to much or I'm at a total programmers block. I've got it half done myself but it's driving me nuts. I'm no mathamatition, but if I'm shown how I'll understand. Does anyone know of a good tutorial site? Your help would be greatly appreciated!!!!!!! Edited by - Crippen on 10/29/00 1:59:39 PM Edited by - Crippen on 10/29/00 2:07:56 PM

Share this post


Link to post
Share on other sites
JD    208
Search for mr.gamemaker web site and check out his dot product tutorial, I think. Also a good book like "Real Time Rendering" might help. You use dot product to find out if one vertex of triangle lies behind the plane of the other triangle that will tell you if you''ve collided and second you have to find out where on the surface of the plane the intersection happened. For that use barycentric coords or 360 degree rule by making two vectors from the point of intersection to two vertices and compute dot product and get an angle measure (cotangent * dot) you do that 3 times and sum up the angle measure if it''s close to 360 you''re in. There are other methods too so check out gamasutra article for them. Go to my website and check out the links maybe you''ll find something in there. Actually, if the search engine on this site works then do a search because I''m positively sure this has been discussed numerous times here.

Share this post


Link to post
Share on other sites
zedzeek    529
unfortunately collision detetection is prolly the most difficult thing to do correctly in a 3d engine.
a tri , tri collision is also one of the hardest/slowest to do
there are quite a few sources on the net though
http://www.realtimerendering.com/int/

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites