I'm trying to Pick objects that has overlapping BBoxes. So I would guess Object1.BBoxRight < Object2.BBoxLeft would detect if they were intersecting, but would also pick every other instance of Object1 left of Object2. How do I pick only the intersecting instances using BBox?
Develop games in your browser. Powerful, performant & highly capable.
Found this c++ code that might solve it.
if (RectA.Left < RectB.Right && RectA.Right > RectB.Left &&
RectA.Top < RectB.Bottom && RectA.Bottom > RectB.Top )
Just hope i can translate it to something usable in C2
Solved it. Sharing here in case someone else needs to detect collisions based on the BBox. Great for example on isometric games och if you need to detect collisions other than the collision polygon.