Function bevy_mod_raycast::update_raycast[][src]

pub fn update_raycast<T: 'static + Send + Sync>(
    state: Res<'_, PluginState<T>>,
    meshes: Res<'_, Assets<Mesh>>,
    pick_source_query: Query<'_, &mut RayCastSource<T>>,
    culling_query: Query<'_, (&Visible, Option<&BoundVol>, &GlobalTransform, Entity), With<RayCastMesh<T>>>,
    mesh_query: Query<'_, (&Handle<Mesh>, &GlobalTransform, Entity), With<RayCastMesh<T>>>
)

Generate updated rays for each ray casting source, then iterate through all entities with the RayCastMesh component, checking for intersections. If these entities have bounding volumes, these will be checked first, greatly accelerating the process.