Function ambient_api::prelude::physics::raycast_first
source · pub fn raycast_first(origin: Vec3, direction: Vec3) -> Option<RaycastHit>
Expand description
Casts a ray from origin
in direction
, and returns the first RaycastHit if it hits.
direction
must be normalized.