Skip to content

Add picking support for tiles - #640

Open
Buncys wants to merge 6 commits into
StarArawn:mainfrom
Buncys:picking
Open

Add picking support for tiles#640
Buncys wants to merge 6 commits into
StarArawn:mainfrom
Buncys:picking

Conversation

@Buncys

@Buncys Buncys commented Aug 6, 2026

Copy link
Copy Markdown

Summary

This PR adds native picking support, as requested in #572.

Usage

bevy_ecs_tilemap = { version = "0.19", features = ["picking"] }

Picking events are reported on the tile entity (not the tilemap entity). Attach observers like this:

commands.entity(tile_entity).observe(|click: On<Pointer<Click>>| { /* ... */ });

See the picking example (cargo run --example picking --features picking).

Implementation

Mostly based on this comment by @TheNeikos (thanks!).

Fixes #572

@Buncys

Buncys commented Aug 8, 2026

Copy link
Copy Markdown
Author

Looks like CI keeps failing on dead-code warnings in examples/helpers/ldtk.rs, unrelated to this PR. Reproducible in main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add native picking support for tiles

1 participant