Refactor Bevy_Picking to use MouseButton instead of PointerButton. - #25392
Open
codecnotsupported wants to merge 12 commits into
Open
Refactor Bevy_Picking to use MouseButton instead of PointerButton.#25392codecnotsupported wants to merge 12 commits into
codecnotsupported wants to merge 12 commits into
Conversation
Member
|
Yeah, as I look at this I have no idea why it's duplicated. Probably historical reasons of dependency trees. This needs a migration guide however :) |
codecnotsupported
marked this pull request as ready for review
August 14, 2026 10:32
Contributor
Author
Added the migration guide. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
A previous PR #24659 I changed fixed the Panning Plugin, but introduced a breaking change.
Upon further inspection but I didn't understand why Bevy_Picking used its own PointerButton instead of Bevy's
MouseButton.I figured I'd run into the reason if I refactored the code to use MouseButton. To no avail. As I still have no idea why PointerButton was used.
This PR fixes the breaking change & removes PointerButton as it seems redundant.
Solution
Replace
PointerButtonwithMouseButton.Testing
cargo run -p ci -- testcargo run --example pan_camera_controller --features="pan_camera"Both ran successfully.
Not as far as I know.
Notes
Tell me if I need to redo the PR because of the merge commits or need to split up the commits more.