## Quad Collision-Detection

Member
Posts: 567
Joined: 2004.07
Post: #1
is there a good tutorial for quad collision-detection? all i can fid is plane-intersection, etc.

It's not magic, it's Ruby.
Moderator
Posts: 3,591
Joined: 2003.06
Post: #2
There seems to be an infinite amount of info on collision detection out there, you must not be putting in the right search terms. Are you talking about 2D or 3D? AABB or OBB? You say, "quad" so that makes me think that you want to do basic sprite collision detection, but I don't have e.s.p. so you're gonna have to specify a little more clearly what you're trying to do.
Member
Posts: 567
Joined: 2004.07
Post: #3
2d, basic sprite collision, OBB.(I believe that's more accurate).

It's not magic, it's Ruby.
Member
Posts: 86
Joined: 2005.01
Post: #4
Some basic rectangle-rectangle collision is probably sufficient to work here. I think GDNet has a good article on it, here.

If you're looking for it in 3D, it's pretty much the same thing with some mild rotation thrown in
Moderator
Posts: 3,591
Joined: 2003.06
Post: #5
ravuya's link is really good for the AABB (Axis-Aligned Bounding Box) approach. It has several limitations but I would definitely try that route first if you're just getting started.

If you really want to do 2d OBB (Oriented Bounding Box) I would recommend just going for 2d polygonal collision detection instead since it's basically the same difficulty, and you get to optionally add more or less detail to your bounds to make it more accurate when you need it or not. The only trick with learning polygonal collision detection is understanding what the heck a "separation axis" is and how it's used. You might want to try this approach after AABB.
Member
Posts: 567
Joined: 2004.07
Post: #6
ravuya Wrote:Some basic rectangle-rectangle collision is probably sufficient to work here. I think GDNet has a good article on it, here.

If you're looking for it in 3D, it's pretty much the same thing with some mild rotation thrown in

Thanks, that really helped me.
-Nayr

It's not magic, it's Ruby.

Possibly Related Threads...
 Thread: Author Replies: Views: Last Post 2D Pixel Collision Detection using OCCLUSION Elphaba 0 4,295 Jun 8, 2009 06:30 AM Last Post: Elphaba the best way to do collision detection ghettotek 26 17,095 Jun 4, 2009 02:30 PM Last Post: AnotherJake Hierarchy, gluProject and collision detection lemtoo 3 6,653 Nov 30, 2007 09:26 AM Last Post: lemtoo Y value of a point on a quad evenmybird 5 5,487 Aug 6, 2006 02:32 PM Last Post: OneSadCookie quick opengl 2d quad question dave05 2 4,726 Jun 9, 2005 06:09 PM Last Post: arekkusu