#bvh #back-end #tree #mesh #bevy #picking #plugin

bevy_picking_bvh_backend

A picking backend plugin for Bevy which uses a BVH tree to improve performances

1 unstable release

new 0.1.0 Feb 17, 2025

#274 in Graphics APIs

47 downloads per month

MIT license

47KB
942 lines

Bevy Picking Bvh Backend

This plugins is a drop-in replacement of MeshPickingPlugin, reusing most of its components, to provider better performance when raycasting through a (very) large mesh.

To try the example, just run :

cargo run --example simple --release

For large meshes, it is recommended to use release mode, because building of the BVH tree can take some time

Large mesh example

Download the following mesh https://github.com/pettett/dragon_high using the following commands:

mkdir -p assets/models
wget https://github.com/pettett/dragon_high/raw/refs/heads/main/dragon_high.glb -O assets/models/dragon_high.glb

Then run the dragon_high sample:

cargo run --example dragon_high --release

Dependencies

~41–75MB
~1.5M SLoC