bmp
bevy_mod_picking
cargo install bevy_mod_picking
bmp

bevy_mod_picking

Unofficial 3D mouse picking plugin for Bevy

by Aevyrie

0.7.0 (see all)License:MIT
cargo install bevy_mod_picking
Readme

Mouse Picking for Bevy

crates.io docs.rs CI Bevy tracking

A Bevy plugin for mouse picking, making it easy to interact with geometry in Bevy using a mouse or touch. This plugin is built with bevy_mod_raycast.



Features

  • Mouse intersection coordinates in world space
  • Mouseover and mouseclick events
  • Configurable highlighting
  • Selection state management
  • 3D debug cursor
  • Touch support
  • Common keybindings (Ctrl+A, Ctrl+Click multi-select)

Quickstart

It only takes a few lines to get mouse picking working in your Bevy application using this plugin.

  1. Add the crate to your dependencies in Cargo.toml:
bevy_mod_picking = "0.6"
  1. Import the plugin:
use bevy_mod_picking::*;
  1. Add the plugin to your app:
.add_plugins(DefaultPickingPlugins);
  1. Mark your camera as the picking source with the PickingCameraBundle component:
.insert_bundle(PickingCameraBundle::default());
  1. Add the PickableBundle component to any meshes you want to make pickable:
.insert_bundle(PickableBundle::default())

That's all there is to it! Read the docs and look at the provided examples to learn more.

Demo

To run a minimal demo of picking features, clone this repository and run:

cargo run --example minimal 

Bevy Version Support

I intend to track the main branch of Bevy. PRs supporting this are welcome!

bevy bevy_mod_picking
0.7 0.6, 0.7
0.6 0.5
0.5 0.4
0.4 0.3
0.3 0.2

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in bevy_mod_picking by you, shall be licensed as MIT, without any additional terms or conditions.

GitHub Stars

215

LAST COMMIT

23d ago

MAINTAINERS

1

CONTRIBUTORS

18

OPEN ISSUES

4

OPEN PRs

3
VersionTagPublished
0.7.0
23d ago
0.5.5
2mos ago
0.6.1
2mos ago
0.6.0
2mos ago
No alternatives found
No tutorials found
Add a tutorial