Triangle Collision
Displaying 1-7 of 7 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Omni

Anyone have any links or information on how I could do this?

Posted on 2004-06-03 23:06:45

Omni

Yes, between triangles.

Posted on 2004-06-04 02:13:23

mcgrue

Quote:Originally posted by grenideer

Sorry, we rather frown upon no-text messages. Please think up something to say, or don't say anything at all. Also, say something more than N/T or No Text or anything like that. That really annoys us, and we have the power to do something about it.

^ My way of sticking it to Grue.


The original message was deleted.

^My way of sticking it to Gren!.

See this msg's title for his true message.

Posted on 2004-06-04 02:31:31

grenideer

http://search.yahoo.com/search?fr=fp-pull-web-t&p=triangle+collision

But really it depends the circumstances. Any collision should first be done with bounding boxes/spheres otherwise it might end up getting expensive. Hmm, it also depends if you're doing this in 2D or 3D.

You could check point in triangle for the 3 points of one triangle against all the others, but this isn't accurate in all cases. You would have three vectors defining the 3 edges of the triangle, and you could do half-space tests (dot product) against each edge-point to make sure it is within bounds.

You could approach this totally different ways. It would be harder, if for example, you wanted to do triangle to triangle collision for all geometry in a 3D world, than to do 2D triangle collision in something verge-based.

EDIT: dang Grue, yer fast!

Posted on 2004-06-04 02:33:38 (last edited on 2004-06-04 02:36:31)

Omni

Hmm. Maybe triangle collision isn't quite what I'm looking for...especially if I'll have to use Rects anyway.

Posted on 2004-06-04 02:38:14

grenideer

The easiest rect collision would be 2D Axis-aligned, like Pong. You could define a rect by topleft and bottomright and check any point to see if it's in-between those in the x and y planes. 3D just adds a z to this factor.

If these rects are not axis-aligned, then things get more complicated. You could fudge it, and do collision against invisible axis-aligned bounding boxes. Otherwise things start getting harder.

If you're doing non-axis aligned and it doesn't need to be super-accurate, just do circle/sphere collision. If the distance between point A and B is less than or equal to the sum or their two radii, they are touching.

Posted on 2004-06-04 02:51:58

Omni

Yeah, circle collision seems pretty easy and understandable for both a 2D and 3D game.

What I was originally thinking about this for, was for an overshooter similar to that vector-based Asteroids game, and I figured I could assemble polygonal asteroids out of a bucketload of triangles.

But anyway, that idea has lost some of its luster. Maybe I'll take another look at it later.

Posted on 2004-06-04 03:17:32


Displaying 1-7 of 7 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.