docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetRectIntersection

    GetRectIntersection(Line, Rect, ref Vector2, ref Vector2)

    Get the intersection status and points between a line and a rect.

    Declaration
    public static bool GetRectIntersection(AutoRouter.Line a, Rect rc, ref Vector2 entry, ref Vector2 exit)
    Parameters
    Type Name Description
    AutoRouter.Line a

    Line that intersect the rect

    Rect rc

    Rect tested for intersection

    Vector2 entry

    Line enter the rect from that point

    Vector2 exit

    Line exist the rect from that point

    Returns
    Type Description
    bool

    True if line intersects the rect

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)