Advanced Collision Detection

BlitzMax Forums/BlitzMax Programming/Advanced Collision Detection

Tibit(Posted 2005) [#1]
Is there anyone who knows how to handle collisions agains polygons?

Something that could be used like the drawpoly command, so that you could use that kind of maps. That is if I draw an advanced poly from an array, then I want to have a function which determines when a rect is inside this poly = collides with it. My idea was to have a map that is a png image and then use some sort of poly to draw the outlines of the walls/objects that are considered "not passable". I cannot use image collide for this as it is too slow.

Please if you know where I can find more information about this please feel free to post links!


Sweenie(Posted 2005) [#2]
This tutorial describes a good method called SAT(Separating Axis Theorem)...
http://www.harveycartel.org/metanet/tutorials/tutorialA.html

It also have a lot of small interactive flash-apps to explain certain things visually.


Tibit(Posted 2005) [#3]
Looks really promising! Now I have to take a deeper look at it =)


Tibit(Posted 2005) [#4]
Found this : http://www.blitzbasic.com/Community/posts.php?topic=42341


JoshK(Posted 2005) [#5]
It's fairly easy if you are willing to use convex objects, as most engines do. I wrote an FPS demo a while ago that had moving collision with spinning objects. There was a rotating cylinder the player could run along, and a spinning fan that knocked you around.


Tibit(Posted 2005) [#6]
Convex Objects?

Is source included in your FPS demo? Is it 2D?


JoshK(Posted 2005) [#7]
3D.

Use a plane/ray intersection test for each face of the brush, and see if the intersection point is behind all the other brush faces.

You probably have no idea what I'm talking about.


Russell(Posted 2005) [#8]
Don't forget to flornutricate the oslanurple. Otherwise, the geometrification factor is disanomolated in relation to the optomagnileveling transform.

Russell


Sweenie(Posted 2005) [#9]
Don't forget to flornutricate the oslanurple

Ouch! Everyone know what happens if you flornutricate the oslanurple... bad idea

You probably have no idea what I'm talking about


I think you explained it pretty well there Halo.

Clarification: I meant that he described the intersection test well. :)


Tibit(Posted 2005) [#10]
The link I found above was a polygon collision module for blitxmax so that was actually right on the spot I highly recommend it!


I think you explained it pretty well there Halo.

Clarification: I meant that he described the intersection test well. :)


Intersection test?


Sweenie(Posted 2005) [#11]
The one halo mentions a few post above.