I have a game world, with all entities being contained by a bounding box. This is working fine, i am in the process of updating my collision code. However im having issues with deciding if objects are colliding am i doing this right? If not where am i going wrong?
I have object A and object B with x y and z max and minimums of them all.
1) (if object A min X >Object B max X OR object B min X >Object A max X)
X axis is colliding
(if object A min Y>Object B max Y OR object B min Y >Object A max Y)
Y axis is colliding
(if object A min Z >Object B max Z OR object B min Z >Object A max Z )
Z axis is colliding
if X / Y and Z axis are colliding then i have a collision