| Crates.io | bevy_shape_draw |
| lib.rs | bevy_shape_draw |
| version | 0.1.2 |
| created_at | 2022-12-06 10:47:26.227364+00 |
| updated_at | 2023-01-04 13:46:16.745802+00 |
| description | A shape drawing tool for Bevy |
| homepage | |
| repository | https://github.com/oscrim/bevy_shape_draw |
| max_upload_size | |
| id | 731061 |
| size | 15,113,741 |
A Bevy plugin for drawing a shape using raycasting in 3d space with a mouse. This plugin is build on and relies on bevy_mod_raycast.
The only shape that can be drawn at the moment is a box of fixed height
Add the plugin to the [dependencies] in Cargo.toml
bevy_shape_draw = "0.1"
You will need to add the Draw Shape Plugin.
.add_plugin(bevy_shape_draw::DrawShapePlugin)
Then you will have to add the raycast source to your camera.
.insert(bevy_shape_draw::ShapeDrawRaycastSource::new())
Finally, mark any meshes that you want to be able to draw shapes on.
.insert(bevy_shape_draw::ShapeDrawRaycastMesh::default())
cargo run --example simple
cargo run --example events