Struct RaycastResult
A struct containing the InstanceId, distance and point extracted from an IPicker during a raycast into the scene.
Inherited Members
Namespace: Unity.Cloud.DataStreaming.Runtime
Assembly: Unity.Cloud.DataStreaming.Runtime.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. |