{!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 CastRay | Unity Physics | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CastRay

    CastRay(RaycastInput)

    Cast ray.

    Declaration
    public bool CastRay(RaycastInput input)
    Parameters
    Type Name Description
    RaycastInput input

    The input.

    Returns
    Type Description
    bool

    True if there is a hit, false otherwise.

    Implements
    ICollidable.CastRay(RaycastInput)

    CastRay(RaycastInput, out RaycastHit)

    Cast ray.

    Declaration
    public bool CastRay(RaycastInput input, out RaycastHit closestHit)
    Parameters
    Type Name Description
    RaycastInput input

    The input.

    RaycastHit closestHit

    [out] The closest hit.

    Returns
    Type Description
    bool

    True if there is a hit, false otherwise.

    Implements
    ICollidable.CastRay(RaycastInput, out RaycastHit)

    CastRay(RaycastInput, ref NativeList<RaycastHit>)

    Cast ray.

    Declaration
    public bool CastRay(RaycastInput input, ref NativeList<RaycastHit> allHits)
    Parameters
    Type Name Description
    RaycastInput input

    The input.

    NativeList<RaycastHit> allHits

    [in,out] all hits.

    Returns
    Type Description
    bool

    True if there is a hit, false otherwise.

    Implements
    ICollidable.CastRay(RaycastInput, ref NativeList<RaycastHit>)

    CastRay<T>(RaycastInput, ref T)

    Cast ray.

    Declaration
    public bool CastRay<T>(RaycastInput input, ref T collector) where T : struct, ICollector<RaycastHit>
    Parameters
    Type Name Description
    RaycastInput 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.

    Implements
    ICollidable.CastRay<T>(RaycastInput, ref T)
    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)