6 releases (breaking)

0.18.0 Mar 5, 2024
0.17.0 Nov 10, 2023
0.16.0 Oct 30, 2023
0.15.0 Aug 21, 2023
0.1.0 May 3, 2023

#2194 in Game dev

Download history 456/week @ 2024-01-24 526/week @ 2024-01-31 705/week @ 2024-02-07 763/week @ 2024-02-14 753/week @ 2024-02-21 928/week @ 2024-02-28 890/week @ 2024-03-06 872/week @ 2024-03-13 1042/week @ 2024-03-20 841/week @ 2024-03-27 1148/week @ 2024-04-03 1017/week @ 2024-04-10 1489/week @ 2024-04-17 1008/week @ 2024-04-24 1010/week @ 2024-05-01 848/week @ 2024-05-08

4,526 downloads per month
Used in 3 crates (via bevy_mod_picking)

MIT/Apache

78KB
1.5K SLoC

A picking backend for bevy_ui.

Usage

This backend does not require markers on cameras or entities to function. It will look for any pointers using the same render target as the UI camera, and run hit tests on the UI node tree.

Important Note

This backend completely ignores FocusPolicy. The design of bevy ui's focus systems and the picking plugin are not compatible. Instead, use the Pickable component to customize how an entity responds to picking focus.

Implementation Notes

  • Bevy ui can only render to the primary window
  • Bevy ui can render on any camera with a flag, it is special, and is not tied to a particular camera.
  • To correctly sort picks, the order of bevy UI is set to be the camera order plus 0.5.

Dependencies

~41–79MB
~1M SLoC