#3d #graphics #bevy

bevy_mod_raycast

Ray Casting for the Bevy Engine

35 releases (17 breaking)

0.18.0 Jul 5, 2024
0.17.0 Feb 23, 2024
0.16.0 Nov 10, 2023
0.9.0 Jul 18, 2023
0.1.0 Jan 22, 2021

#1445 in Game dev

Download history 2545/week @ 2025-08-25 2498/week @ 2025-09-01 2743/week @ 2025-09-08 2680/week @ 2025-09-15 2068/week @ 2025-09-22 1678/week @ 2025-09-29 1582/week @ 2025-10-06 1561/week @ 2025-10-13 2072/week @ 2025-10-20 1745/week @ 2025-10-27 1748/week @ 2025-11-03 1621/week @ 2025-11-10 1857/week @ 2025-11-17 1620/week @ 2025-11-24 1723/week @ 2025-12-01 1229/week @ 2025-12-08

6,678 downloads per month
Used in 19 crates (9 directly)

MIT license

185KB
1K SLoC

bevy_mod_raycast

A small Bevy plugin for mesh raycasting.

CI docs.rs crates.io

reflecting_lasers example

Getting Started

Using the Raycast system param, you don't even need to add a plugin, you can directly raycast into the ECS:

use bevy_mod_raycast::prelude::*;

fn my_raycast_system(mut raycast: Raycast) {
    let ray = Ray3d::new(Vec3::ZERO, Vec3::X);
    let hits = raycast.cast_ray(ray, &RaycastSettings::default());
}

Bevy Version Support

I intend to track the `main` branch of Bevy. PRs supporting this are welcome!
bevy bevy_mod_raycast
0.14 0.18
0.13 0.17
0.12 0.16
0.11 0.9 - 0.15
0.10 0.8
0.9 0.7
0.8 0.6
0.7 0.4 - 0.5
0.6 0.3
0.5 0.2
0.4 0.1

Dependencies

~43–83MB
~1.5M SLoC