GithubHelp home page GithubHelp logo

joshua-maros / bevy_mod_raycast Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aevyrie/bevy_mod_raycast

0.0 0.0 0.0 400 KB

Unofficial plugin for raycasting in Bevy

License: MIT License

Rust 100.00%

bevy_mod_raycast's Introduction

Ray Casting for Bevy

CI crates.io docs.rs Bevy tracking

A Bevy plugin for 3D ray casting against meshes. Used to build bevy_mod_picking. Contributions welcome!

ezgif-2-69b8dc941be6

Uses

This plugin makes it simple to create ray casting sources, such as a transform (first person, third person shooter), or screenspace coordinates (mouse picking). Rays are shot from these sources every frame using a bevy system, and the intersections are stored in the ray casting source's component.

  • Only meshes that you mark with a component will be checked for intersections.
  • You can define which ray casting source(s) should interact with which mesh(es) by marking grouped sources and targets with the same type.
  • This plugin also provides some functionality to compute the intersection of rays with primitive shapes.
  • Rudimentary acceleration is provided with opt-in bounding spheres.

Bevy Version Support

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

bevy bevy_mod_raycst
0.5 0.2
0.4 0.1

Examples

Mouse picking using a ray cast built using screen space coordinates:

cargo run --example mouse_picking

Ray casting from a camera using ray casts from the camera entity's GlobalTransform:

cargo run --example minimal

Optimization Mouse picking over many meshes using bounding volumes:

cargo run --example bounding_volume

Optimization Mouse picking over complicated mesh using simplified mesh:

cargo run --example simplified_mesh

bevy_mod_raycast's People

Contributors

aevyrie avatar mockersf avatar ratysz avatar sarthaksingh31 avatar siler avatar someguynamedjosh 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.