docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method RayLineParameter

    RayLineParameter(float3, float3, float3, float3)

    Returns the parameterization of a ray line projection. The parameter will be negative if the nearest point between the ray/line is negative to 'lineOrigin', and greater than 1 if nearest intersection is past the end off the line segment (lineOrigin + lineDir).

    Declaration
    public static float RayLineParameter(float3 ro, float3 rd, float3 lineOrigin, float3 lineDir)
    Parameters
    Type Name Description
    float3 ro

    The ray origin point.

    float3 rd

    The ray direction (normalized vector).

    float3 lineOrigin

    Line segment first point.

    float3 lineDir

    Line segment direction (with magnitude).

    Returns
    Type Description
    float

    The parameter of a ray line projection.

    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)