MTD for concave polygons

Started by
13 comments, last by CuppoJava 18 years, 10 months ago
Quote:Seriously, why did I need FMOD to run that?

^^ Sorry for that :-D I used my 2D engine (which is actually rather a OpenGL, SDL, DevIL, FRMOD wrapper) as a framework for this app. Of course that was stupid, but I'm so lazy... I already created a new demo framework using NOTHING than OpenGL ;-) So the next demo won't be bigger than a few kb.

Thanks for your good comments! I'll try to fix all the problems.
But right now I'm also implementing rigid-body-dynamics (which I didn't really understand), so the whole thing will take a while :-D
Advertisement
New file

Here's the new version (this time only about 44 kb) :-D
I din't add any special features but this time you can see the MTD (objects aren't moving any more). That way it's much easier to find those nasty bugs...

(The old download has been disabled)
the problem with concave polygons is, that no matter your algorithm to seperate them, i bet i can always find i situation in which it will produce no or nonsensical results.

the problem with convex or rather unions of convex polygons is that you can easily find out how to seperate two polygons, but that doesnt mean the entire union will be seperated.

personally i think the most robust approach to collision detection involves partitioning into convex regions, aswell as precalculating and giving each region a normal, or direction of ejection, so that when one object penetrates the other, you apply a force/impulse proportional to the amount of penetration in the direction indicated.
@Eelco
I think I must agree here. That stuff gets far too complicated to handle for me :-(
So I'll quit! From now on I'll use convex polygons instead...
I ran the demo,
I'm not sure I know what you mean by MTD anymore...
There are a lot of cases where the two shapes would still be overlapping if moved according to the line that was drawn. Maybe I missed something here...

This topic is closed to new replies.

Advertisement