Skip to content

Unable to handle sprite picking events through RenderTextures #23545

@kfjustis

Description

@kfjustis

Bevy version and features

  • Forked from 0f6d574
  • Modified the sprite_picking example so correct picking features should be enabled already.

Relevant system information

  • Linux (wayland)
  • NVIDIA GeForce RTX 2060 SUPER, driver 595.45.04
  • Vulkan backend
  • rustc 1.94.0, stable-x86_64-unknown-linux-gnu

What you did

Modified the sprite_picking example to render through a RenderTexture, just like the pixel_grid_snap example. A forked repo with minimal code changes can be found here: https://github.com/kfjustis/bevy/tree/sprite_picking_rendertarget

What went wrong

I expected the same mouse hover/click events to fire as the normal sprite_picking example, which should cause the sprites to change color. However, even with the SpritePickingMode set to BoundingBox, 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:

cargo run --example sprite_picking

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-PickingPointing at and selecting objects of all sortsA-RenderingDrawing game state to the screenC-DocsAn addition or correction to our documentationD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!X-UncontroversialThis work is generally agreed upon

    Type

    No type

    Projects

    Status

    Needs SME Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions