Struct RayCastHit
Raycast hit result data.
Assembly: FlaxEngine.dll
File: Engine/Physics/Types.h
Syntax
public struct RayCastHit
Fields
Collider
The collider that was hit.
Declaration
public PhysicsColliderActor* Collider = nullptr
Field Value
|
PhysicsColliderActor
|
Distance
The distance from the ray's origin to the hit location.
Declaration
public float Distance
Field Value
|
float
|
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 uint32 FaceIndex
Field Value
|
uint32
|
See Also
Material
The physical material of the surface that was hit.
Declaration
public PhysicalMaterial* Material = nullptr
Field Value
|
PhysicalMaterial
|
Normal
The normal of the surface the ray hit.
Declaration
public Vector3 Normal
Field Value
|
Vector3
|
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
|