13 releases (7 breaking)

0.20.0 Jul 6, 2024
0.19.1 Jun 21, 2024
0.18.0 Mar 5, 2024
0.17.0 Nov 10, 2023
0.2.0 Jul 7, 2023

#2391 in Game dev

Download history 1453/week @ 2024-08-11 1076/week @ 2024-08-18 1453/week @ 2024-08-25 1757/week @ 2024-09-01 1558/week @ 2024-09-08 1198/week @ 2024-09-15 2001/week @ 2024-09-22 1427/week @ 2024-09-29 1370/week @ 2024-10-06 1288/week @ 2024-10-13 1251/week @ 2024-10-20 1256/week @ 2024-10-27 1704/week @ 2024-11-03 1376/week @ 2024-11-10 1133/week @ 2024-11-17 1304/week @ 2024-11-24

5,628 downloads per month
Used in 8 crates (2 directly)

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

~35–71MB
~1.5M SLoC