RaycastHit Struct

Result of a raycast against the physics world.

public readonly struct RaycastHit
Properties
Component The PhysicsBodyComponent that was hit, or null if the body has no associated component (e.g. the physics system has not yet initialized).
Distance Distance from the ray origin to the hit point in pixels (Fraction * maxDistance passed to the query).
Fraction Fraction along the ray (0 = origin, 1 = origin + full translation).
Normal Surface normal at the hit point, pointing away from the hit shape.
Point World-space hit point in pixel coordinates.
SubShape The specific sub-shape that was hit, or null when the primary shape was hit (or the body uses a chain shape whose segments have no individual SubShape).