Git Product home page Git Product logo

bevy_mod_picking's Introduction

Mouse Picking for Bevy

crates.io docs.rs CI Bevy tracking

picking_demo

A Bevy plugin for picking, making it easy to interact with meshes in Bevy. 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 plugin to your app:
.add_plugins(DefaultPickingPlugins);
  1. Mark your camera as the picking source with the PickingCameraBundle component:
.insert(PickingCameraBundle::default());
  1. Add the PickableBundle component to any meshes you want to make pickable:
.insert(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, 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.9 0.10, 0.11
0.8 0.8, 0.9
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.

bevy_mod_picking's People

Contributors

aevyrie avatar guimcaballero avatar chaoticgood1 avatar unflimflammable avatar verzuz avatar mockersf avatar gavlig avatar ratysz avatar enbugger avatar dotred108 avatar yoshierahuang3456 avatar thlorenz avatar sim-the-bean avatar sludgephd avatar rishikumarray avatar olegomon avatar therawmeatball avatar mcobzarenco avatar obsgolem avatar johanhelsing avatar jakobhellermann avatar brunowallner avatar

Stargazers

Artur Wyszyński avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.