docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetSideDistances

    GetSideDistances(List<Rect>, Vector2, ref float, ref float)

    Get the left and right x coordinates that a line would intersect from a given point to a list of obstacles.

    Declaration
    public static void GetSideDistances(List<Rect> nodes, Vector2 start, ref float minLeftX, ref float minRightX)
    Parameters
    Type Name Description
    List<Rect> nodes

    Obstacles to test

    Vector2 start

    Start point for testing the ray

    float minLeftX

    Minimum left obstacle collision

    float minRightX

    Minimum right obstacle collision

    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)