mini_arcade_core.spaces.collision.rect_collider¶
A simple rectangular collider for collision detection.
Classes¶
A simple rectangular collider for collision detection. |
Module Contents¶
- class mini_arcade_core.spaces.collision.rect_collider.RectCollider¶
A simple rectangular collider for collision detection.
- Variables:
- position: mini_arcade_core.spaces.math.vec2.Vec2¶
- property rect: mini_arcade_core.spaces.geometry.shapes.Rect¶
Get the bounding rectangle of the collider.
- Returns:
Bounding rectangle.
- Return type:
- intersects(other: RectCollider, *, inclusive: bool = True) bool¶
Check if this rectangle collider intersects with another rectangle collider.
- Parameters:
other (RectCollider) – The other rectangle collider.
- Returns:
True if the rectangles intersect, False otherwise.
- Return type:
bool