box-box collision
Blitz3D Forums/Blitz3D Programming/box-box collision
| ||
Hey all... I Need to know if two meshes are colliding, they are both cubes. Now, i could use "polygon-polygon" collision, which is working now, but, considering a cube has 12 triangles, thats doing 12x12 checks per cube... is there a quicker way, mathematically? cheers |
| ||
Separating Axis test... http://www.gamasutra.com/features/19991018/Gomez_5.htm |
| ||
I cant get into that site, and the registration seems to want to know an awful amount of stuff.. Could you gimme some details? :D |
| ||
Short explanation(Bad explanation?): You project the vertices of both boxes onto the boxes unique planes and check if the projected vertices overlap. Gamedev discussion here-> http://www.gamedev.net/community/forums/topic.asp?topic_id=201240 |
| ||
HMmm, i will take a look, thanks.. i cant see it being all that much faster though :/ |
| ||
ouch....just managed to login.. thats gota be slower than the way im doing it :S Cheers for the help anyway... Preliminary tests show meshesintersect isnt causing a point of bother anyway.... would like to avoid that commend :/ |
| ||
Yeah, I've never used MeshesIntersect but would image it would be usable with just 2 cubes, as you say they only have 12 tris each. Maybe you could have bounding spheres on the cubes and initially check for collisions between them before performing the MeshesIntersect? Could be of benefit, I dunno. :) |
| ||
Im already doing that.. :) :D |