docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method PolygonsWithinSqRange

    PolygonsWithinSqRange(List<Vector3>, List<Vector3>, float)

    Determines if two convex coplanar polygons are within a specified distance from each other.

    Declaration
    public static bool PolygonsWithinSqRange(List<Vector3> polygonA, List<Vector3> polygonB, float maxSqDistance)
    Parameters
    Type Name Description
    List<Vector3> polygonA

    The first polygon to test. Must be convex and coplanar with polygonB.

    List<Vector3> polygonB

    The second polygon to test. Must be convex and coplanar with polygonA.

    float maxSqDistance

    The square of the maximum distance allowed between the two polygons.

    Returns
    Type Description
    bool

    True if the polygons are within the specified distance from each other, false otherwise.

    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)