Class RayCastHit
Raycast hit result data.
Inheritance
System.Object
RayCastHit
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public sealed class RayCastHit : ValueType
Fields
Collider
The collider that was hit.
Declaration
public PhysicsColliderActor Collider
Field Value
PhysicsColliderActor
|
Distance
The distance from the ray's origin to the hit location.
Declaration
public float Distance
Field Value
System.Single
|
FaceIndex
The index of the face that was hit. Valid only for convex mesh (polygon index), triangle mesh (triangle index) and height field (triangle index).
Declaration
public uint FaceIndex
Field Value
System.UInt32
|
See Also
Material
The physical material of the surface that was hit.
Declaration
public PhysicalMaterial Material
Field Value
PhysicalMaterial
|
Normal
Point
The point in the world space where ray hit the collider.
Declaration
public Vector3 Point
Field Value
Vector3
|
UV
The barycentric coordinates of hit triangle. Valid only for triangle mesh and height field.
Declaration
public Float2 UV
Field Value
Float2
|