two right square prism in collision(AABB), how to check which faces are colliding?

Started by
2 comments, last by Hanseul Shin 5 years, 11 months ago

Thanx to @Randy Gaul, I succesfully implemented cube/cube collision detection and response.

1- substract the center of each AABB = 3d vector a.

2- if |x| of a is the biggest, this represents a face on each AABB.

3- if x is pointing at the same(or exact opposte) direction of the normal(of a face), two AABB are colliding on those faces.

But these steps only work if two colliders are cubes, because the size of each half-lengths are different in a right square prism.

I'd like to check which faces are collided with two right square prism, please help!

Thank you!

Advertisement

Same algorithm will work if you first normalize a.

@Randy Gaul You are my idol from now on. Thank you so much

This topic is closed to new replies.

Advertisement