   AABB x OBB collision idea
  In my new game,i need to test collision between an axis aligned box and an oriented aligned box. Now i thought of idea for making a test,but i rather come here first and ask if it would work rather than try it and see it not working if it fails.my idea goes like this : the player has an AABB,i put half the size of the AABB into a vector,and multiply it by the normalized player velocity.i do the same with the OBB(with an inverted direction) and then i test to see if the length between the AABB's center and the OBB center's is smaller than the length of the two vectors i get from multiplying the boxes' size with the normalized direction.Would that work?   
Quote:Original post by Doctor ShinobiIn my new game,i need to test collision between an axis aligned box and an oriented aligned box. Now i thought of idea for making a test,but i rather come here first and ask if it would work rather than try it and see it not working if it fails.my idea goes like this : the player has an AABB,i put half the size of the AABB into a vector,and multiply it by the normalized player velocity.i do the same with the OBB(with an inverted direction) and then i test to see if the length between the AABB's center and the OBB center's is smaller than the length of the two vectors i get from multiplying the boxes' size with the normalized direction.Would that work?I didn't follow that completely, so I'm not sure if it's correct, but for what it's worth, this is pretty much a solved problem (the SAT - separating axis test - is probably what you're looking for).Here's a couple of questions though:1. Is this intended to be a continuous test, or a discrete test?2. What do you mean when you refer to multiplying two vectors together? Are you referring to the dot product?   ;  1.i think discrete? i plan on doing the test once every frame to see if a moving AABB collides with an OBB.2. nope. i mean simply multiplying the vectors with each other.Vx = V1x * V2xVy = V1y * V2yVz = V1z * V2z   ;  That sounds like you would get a spherical collide.   ;  good enough actually. the hard part is to find out how to collide with an OBB.so i guess i should google separating axis test?   ;  No, it won't work, you'll get false positives when the boxes are moving side by side in parallel, I think.You're really reinventing SAT from what I see.   ;  i actually figured another solution for my problem. generally i have a line and the player AABB. i thought of warping the line with an OBB since graphically it is warped by a box. but then i figured it would just be more simple to use that line as a ray and check for collision with the box.so thanks for the help anyway ;)but oh no! another problem! i have a single triangle,and i need to find out if point A to B to C is clockwise or anti clockwise. i tried Googeling but what i found was a solution that depends on other triangles.any ideas on how it is done?