UmbraLuminosa / sickle_ui

A widget library built on top of bevy_ui.
Apache License 2.0
205 stars 24 forks source link

Interaction on custom render targets #17

Open UkoeHB opened 2 months ago

UkoeHB commented 2 months ago

If UI is rendered to a TargetCamera on a custom render target, is there any way for interactions to reach that UI?

Is a custom integration with bevy_mod_picking or similar necessary?

eidloi commented 2 months ago

this is because we rely on Interaction which doesn't have a connection between the pointer space and the render target space. Basically we don't have world-space UI, which is something I plan to look into. We can also ask around the ui-dev channel, but I think this is currently not possible out of the box.

I think if we moved to GPU pick-based interaction this would work out of the box. (As in: render the UI with a unique color per node for the single pixel of the pointer). On a related note this would also mean we can make images properly ignore interaction where they are transparent)