Engine API Reference - v2.7.3
    Preparing search index...

    Class RaycastResult

    Contains the result of a successful raycast intersection with a rigid body. When a ray intersects with a rigid body in the physics simulation, this class stores the complete information about that intersection including the entity, the exact point of impact, the normal at the impact point, and the fractional distance along the ray where the intersection occurred.

    Instances of this class are created and returned by RigidBodyComponentSystem#raycastFirst and RigidBodyComponentSystem#raycastAll methods when performing physics raycasts.

    Index

    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.