{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Method CalculateDistance | Unity Physics | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CalculateDistance

    CalculateDistance(PointDistanceInput)

    Calculate the distance from a point to the object. Return true if there are any hits.

    Declaration
    bool CalculateDistance(PointDistanceInput input)
    Parameters
    Type Name Description
    PointDistanceInput input

    The input.

    Returns
    Type Description
    bool

    True if there is a hit, false otherwise.

    CalculateDistance(PointDistanceInput, out DistanceHit)

    Calculate the distance from a point to the object. Return true if there are any hits, with details of the closest hit in "closestHit".

    Declaration
    bool CalculateDistance(PointDistanceInput input, out DistanceHit closestHit)
    Parameters
    Type Name Description
    PointDistanceInput input

    The input.

    DistanceHit closestHit

    [out] The closest hit.

    Returns
    Type Description
    bool

    True if there is a hit, false otherwise.

    CalculateDistance(PointDistanceInput, ref NativeList<DistanceHit>)

    Calculate the distance from a point to the object. Return true if there are any hits, with details of every hit in "allHits".

    Declaration
    bool CalculateDistance(PointDistanceInput input, ref NativeList<DistanceHit> allHits)
    Parameters
    Type Name Description
    PointDistanceInput input

    The input.

    NativeList<DistanceHit> allHits

    [in,out] all hits.

    Returns
    Type Description
    bool

    True if there is a hit, false otherwise.

    CalculateDistance<T>(PointDistanceInput, ref T)

    Calculate the distance from a point to the object. Return true if there are any hits, with details stored in the collector implementation.

    Declaration
    bool CalculateDistance<T>(PointDistanceInput input, ref T collector) where T : struct, ICollector<DistanceHit>
    Parameters
    Type Name Description
    PointDistanceInput input

    The input.

    T collector

    [in,out] The collector.

    Returns
    Type Description
    bool

    True if there is a hit, false otherwise.

    Type Parameters
    Name Description
    T

    Generic type parameter.

    CalculateDistance(ColliderDistanceInput)

    Calculate the distance from a collider to the object. Return true if there are any hits.

    Declaration
    bool CalculateDistance(ColliderDistanceInput input)
    Parameters
    Type Name Description
    ColliderDistanceInput input

    The input.

    Returns
    Type Description
    bool

    True if there is a hit, false otherwise.

    CalculateDistance(ColliderDistanceInput, out DistanceHit)

    Calculate the distance from a collider to the object. Return true if there are any hits, with details of the closest hit in "closestHit".

    Declaration
    bool CalculateDistance(ColliderDistanceInput input, out DistanceHit closestHit)
    Parameters
    Type Name Description
    ColliderDistanceInput input

    The input.

    DistanceHit closestHit

    [out] The closest hit.

    Returns
    Type Description
    bool

    True if there is a hit, false otherwise.

    CalculateDistance(ColliderDistanceInput, ref NativeList<DistanceHit>)

    Calculate the distance from a collider to the object. Return true if there are any hits, with details of every hit in "allHits".

    Declaration
    bool CalculateDistance(ColliderDistanceInput input, ref NativeList<DistanceHit> allHits)
    Parameters
    Type Name Description
    ColliderDistanceInput input

    The input.

    NativeList<DistanceHit> allHits

    [in,out] all hits.

    Returns
    Type Description
    bool

    True if there is a hit, false otherwise.

    CalculateDistance<T>(ColliderDistanceInput, ref T)

    Calculate the distance from a collider to the object. Return true if there are any hits, with details stored in the collector implementation.

    Declaration
    bool CalculateDistance<T>(ColliderDistanceInput input, ref T collector) where T : struct, ICollector<DistanceHit>
    Parameters
    Type Name Description
    ColliderDistanceInput input

    The input.

    T collector

    [in,out] The collector.

    Returns
    Type Description
    bool

    True if there is a hit, false otherwise.

    Type Parameters
    Name Description
    T

    Generic type parameter.

    In This Article
    Back to top
    Copyright © 2023 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)