docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct RaycastResult

    A struct containing the InstanceId, distance and point extracted from an IPicker during a raycast into the scene.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.Cloud.DataStreaming.Runtime
    Assembly: solution.dll
    Syntax
    public readonly struct RaycastResult

    Fields

    Distance

    The distance between the ray origin and the hit instance.

    Declaration
    public readonly double Distance
    Field Value
    Type Description
    double

    InstanceId

    The InstanceId extracted during the raycast.

    Declaration
    public readonly InstanceId InstanceId
    Field Value
    Type Description
    InstanceId

    Invalid

    Declaration
    public static readonly RaycastResult Invalid
    Field Value
    Type Description
    RaycastResult

    ModelId

    The ModelStreamId extracted during the raycast.

    Declaration
    public readonly ModelStreamId ModelId
    Field Value
    Type Description
    ModelStreamId

    Normal

    The normal of the raycast hit.

    Declaration
    public readonly float3 Normal
    Field Value
    Type Description
    float3

    Point

    The point of intersection between the ray and the hit instance.

    Declaration
    public readonly double3 Point
    Field Value
    Type Description
    double3

    Properties

    HasInstance

    Is true if the raycast hit an identified instance.

    Declaration
    public bool HasInstance { get; }
    Property Value
    Type Description
    bool

    HasIntersected

    Is true if the raycast hit any instance, regardless of that instance's identifier.

    Declaration
    public bool HasIntersected { get; }
    Property Value
    Type Description
    bool

    Methods

    ToString()

    Gets the string representation of this RaycastResult.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The string result.

    Overrides
    ValueType.ToString()
    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)