Method
Parameters
rect
|
Rect2i
|
Rectangle to intersect with
|
Returns
Rect2i
Intersection area
DescriptionGet a rect representing the intersection area with another rectangle. In other words, the returned rectangle represents the overlapping area between two rectangles. Examplevoid Render() { if (playerRect.Intersects(blockRect)) { var area = playerRect.Intersect(blockRect); RB.DrawRect(area, Color.red); } } |
See AlsoRect2i.Intersects Rect2i.IntersectionDepth Rect2i.Contains |