docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method PointOnLineSegmentXZ

    PointOnLineSegmentXZ(Vector3, Vector3, Vector3, float)

    Determines if a point lies on a line segment, ignoring the y components.

    Declaration
    public static bool PointOnLineSegmentXZ(Vector3 testPoint, Vector3 lineStart, Vector3 lineEnd, float epsilon = 1E-45)
    Parameters
    Type Name Description
    Vector3 testPoint

    The point to test.

    Vector3 lineStart

    Starting point of the line segment.

    Vector3 lineEnd

    Ending point of the line segment.

    float epsilon

    Custom epsilon value used for comparison checks.

    Returns
    Type Description
    bool

    True if the point lies on the line segment, 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)