mini_arcade_core.spaces.collision.rect_collider =============================================== .. py:module:: mini_arcade_core.spaces.collision.rect_collider .. autoapi-nested-parse:: A simple rectangular collider for collision detection. Classes ------- .. autoapisummary:: mini_arcade_core.spaces.collision.rect_collider.RectCollider Module Contents --------------- .. py:class:: RectCollider A simple rectangular collider for collision detection. :ivar position (Vec2): Top-left position of the rectangle. :ivar size (Size2D): Size of the rectangle. .. py:attribute:: position :type: mini_arcade_core.spaces.math.vec2.Vec2 .. py:attribute:: size :type: mini_arcade_core.spaces.geometry.size.Size2D .. py:property:: rect :type: mini_arcade_core.spaces.geometry.shapes.Rect Get the bounding rectangle of the collider. :return: Bounding rectangle. :rtype: Rect .. py:method:: intersects(other: RectCollider, *, inclusive: bool = True) -> bool Check if this rectangle collider intersects with another rectangle collider. :param other: The other rectangle collider. :type other: RectCollider :return: True if the rectangles intersect, False otherwise. :rtype: bool