Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aevyrie/bevy_mod_raycast
A little mesh raycasting plugin for Bevy
https://github.com/aevyrie/bevy_mod_raycast
bevy game-development raycasting
Last synced: 30 days ago
JSON representation
A little mesh raycasting plugin for Bevy
- Host: GitHub
- URL: https://github.com/aevyrie/bevy_mod_raycast
- Owner: aevyrie
- License: mit
- Created: 2021-01-21T01:44:45.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-13T01:59:16.000Z (4 months ago)
- Last Synced: 2024-09-27T07:03:50.955Z (about 1 month ago)
- Topics: bevy, game-development, raycasting
- Language: Rust
- Homepage: https://crates.io/crates/bevy_mod_raycast
- Size: 489 KB
- Stars: 319
- Watchers: 2
- Forks: 93
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-bevy - Bevy raycast
README
# `bevy_mod_raycast`
A small [Bevy](https://github.com/bevyengine/bevy) plugin for mesh raycasting.
[![CI](https://github.com/aevyrie/bevy_mod_raycast/actions/workflows/rust.yml/badge.svg?branch=main)](https://github.com/aevyrie/bevy_mod_raycast/actions?query=workflow%3A%22rust.yml%22+branch%3Amain)
[![docs.rs](https://docs.rs/bevy_mod_raycast/badge.svg)](https://docs.rs/bevy_mod_raycast)
[![crates.io](https://img.shields.io/crates/v/bevy_mod_raycast)](https://crates.io/crates/bevy_mod_raycast)![reflecting_lasers example](https://github.com/aevyrie/bevy_mod_raycast/assets/2632925/4a1019d3-cbfa-4b20-b5c9-19a71ca09e04)
## Getting Started
Using the [`Raycast`](https://docs.rs/bevy_mod_raycast/latest/bevy_mod_raycast/immediate/struct.Raycast.html) system param, you don't even need to add a plugin, you can directly raycast into the ECS:
```rs
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());
}
```- 👉 [Read the docs!](https://docs.rs/bevy_mod_raycast)
- Play with the [examples](./examples).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 |