Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Rectangle intersects detection issue

$
0
0

@repstyle_ wrote:

Let's say i make a moving rectangle A overlapping another rectangle B (not moving).
Usually, when A meets the very 1st pixel of B, we can detects this situation by using the Rectangle.Intersects method.

As :
if (A.Intersects(B))
{
//Do things
}

But, i noticed, that depending on the size (width and Height) of A, the Intersects method doesn't work.
Anyone know this issue or know how to solve it ?

I've made a lot of test and if the rectangle is too small (like 30 x 30) intersects don't work but if i use a bigger one (like 100 * 100) it is working. And i'm sure they're overlapping.

I will continue to dig in my code to be sure that a condition is not responsible of that but i don't think that's the case.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles