-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Unable to handle sprite picking events through RenderTextures #23545
Copy link
Copy link
Open
Labels
A-PickingPointing at and selecting objects of all sortsPointing at and selecting objects of all sortsA-RenderingDrawing game state to the screenDrawing game state to the screenC-DocsAn addition or correction to our documentationAn addition or correction to our documentationD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-UncontroversialThis work is generally agreed uponThis work is generally agreed upon
Metadata
Metadata
Assignees
Labels
A-PickingPointing at and selecting objects of all sortsPointing at and selecting objects of all sortsA-RenderingDrawing game state to the screenDrawing game state to the screenC-DocsAn addition or correction to our documentationAn addition or correction to our documentationD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-UncontroversialThis work is generally agreed uponThis work is generally agreed upon
Type
Projects
Status
Needs SME Triage
Bevy version and features
sprite_pickingexample so correct picking features should be enabled already.Relevant system information
What you did
Modified the
sprite_pickingexample to render through a RenderTexture, just like thepixel_grid_snapexample. A forked repo with minimal code changes can be found here: https://github.com/kfjustis/bevy/tree/sprite_picking_rendertargetWhat went wrong
I expected the same mouse hover/click events to fire as the normal
sprite_pickingexample, which should cause the sprites to change color. However, even with theSpritePickingModeset toBoundingBox, mouse input doesn't seem to affect the sprites.Additional information
There is an older issue here related to sprite picking with multiple cameras, but I'm not sure if it's the same bug or not.
It's also possible I just set up the picking incorrectly, so if this is user error, feel free to close this issue.
To test, just build my forked branch and run: