1 unstable release

0.20.0 Jul 9, 2024

#2423 in Game dev

Download history 18/week @ 2024-07-20 23/week @ 2024-07-27 21/week @ 2024-08-03 24/week @ 2024-08-10 2/week @ 2024-08-17 7/week @ 2024-08-24 38/week @ 2024-08-31 20/week @ 2024-09-07 7/week @ 2024-09-14 17/week @ 2024-09-21 58/week @ 2024-09-28 27/week @ 2024-10-05 14/week @ 2024-10-12 5/week @ 2024-10-19 24/week @ 2024-10-26 42/week @ 2024-11-02

86 downloads per month
Used in 3 crates (2 directly)

MIT/Apache

75KB
1.5K SLoC

A raycasting backend for bevy_mod_picking that uses Avian for raycasting.

Usage

Pointers will automatically shoot rays into the Avian scene and pick entities.

To ignore an entity, you can add Pickable::IGNORE to it, and it will be ignored during raycasting.

For fine-grained control, see the AvianBackendSettings::require_markers setting.

Limitations

Because raycasting is expensive, only the closest intersection will be reported. This means that unlike some UI, you cannot hover multiple Avian objects with a single pointer by configuring the Pickable component to not block lower elements but still emit events. As mentioned above, all that is supported is completely ignoring an entity with Pickable::IGNORE.

This is probably not a meaningful limitation, as the feature is usually only used in UI where you might want a pointer to be able to pick multiple elements that are on top of each other. If are trying to build a UI out of Avian entities, beware, I suppose.

Dependencies

~37–74MB
~1.5M SLoC