bevy_picking_rapier 0.15.0

A modular picking plugin for Bevy.
Documentation

A raycasting backend for bevy_mod_picking that uses rapier for raycasting.

Usage

This backend requires you mark any cameras that will be used for raycasting with [RapierPickCamera]. If a pointer passes through this camera's render target, it will automatically shoot rays into the rapier scene and will be able to pick things.

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

Limitations

Because raycasting is expensive, only the closest intersection will be reported. This means that unlike some UI, you cannot hover multiple rapier 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 rapier entities, beware, I suppose.