docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method PointInPolygon

    PointInPolygon(Vector3, List<Vector3>)

    Determines if a point is inside of a polygon on the XZ plane. (The y value is not used.)

    Declaration
    public static bool PointInPolygon(Vector3 testPoint, List<Vector3> vertices)
    Parameters
    Type Name Description
    Vector3 testPoint

    The point to test.

    List<Vector3> vertices

    Vertices defining the outline of a polygon.

    Returns
    Type Description
    bool

    True if the point is inside the polygon, false otherwise.

    In This Article
    • PointInPolygon(Vector3, List<Vector3>)
    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)