Object holding the result of a successful raycast hit.

Properties

entity: Entity

The entity that was hit.

hitFraction: number

The normalized distance (between 0 and 1) at which the ray hit occurred from the starting point.

normal: Vec3

The normal vector of the surface where the ray hit in world space.

point: Vec3

The point at which the ray hit the entity in world space.