Additional collision tests after AABB check

Started by
1 comment, last by AndersG 24 years, 2 months ago
It''s me again, bothering you again Thank''s to Nova, my engine now supports AABB, and point/ plane intersection tests! But there''s still some problems...I''ve read the Gamasutra pages considering these issues, but there''s some things I don''t quite get: After checking every plane of one (possibly) colliding object aginst all points in another object to find a separating plane , there''s still the possibility that that plane isn''t one of the surfaces of either object, right? I didn''t quite get the part of how to find an arbitary plane that could separate the objects, and that''s where I would like som help... Also, it would be great if I could get an example- implementation of a function that multiplies a vector by a rotation matrix. Matrices aren''t my strong side Thank''s everyone and keep up the good work!!
Advertisement
I have not read the Gamasutra article, but in my old DOS engine I used an AABB intersection test (single ray test from the player to the box) to check if we collided with the bounding box, and then I checked the polys, if nescessary. This is only nescessary with complex objects

Rot matrix:
m[00] m[01] m[02]
m[10] m[11] m[12]
m[20] m[21] m[22]

vector:
[ X, Y, Z]

multiply:

m[00] m[01] m[02]
[X'', Y'', Z''] = [ X, Y, Z] * m[10] m[11] m[12]
m[20] m[21] m[22]

X` = m[00]*X + m[01]*Y + m[02]*Z
Y` = m[10]*X + m[11]*Y + m[12]*Z
Z` = m[20]*X + m[21]*Y + m[22]*Z

That is it.
If you have a 4x4 matrix, the left upper 3x3 submatrix is the rotation/scaling matrix

DaBit.


Damn, ascii got screwed up in the previous post, but you should be able to understand it.

DaBit.

This topic is closed to new replies.

Advertisement