Skip to content

HitDataEvent trait - #25662

Open
laundmo wants to merge 1 commit into
bevyengine:mainfrom
laundmo:hit-data-trait
Open

HitDataEvent trait#25662
laundmo wants to merge 1 commit into
bevyengine:mainfrom
laundmo:hit-data-trait

Conversation

@laundmo

@laundmo laundmo commented Sep 2, 2026

Copy link
Copy Markdown
Member

Objective

Trait which just exposes picking events HitData, similar to PointerEvent. Makes it easier to write generic code over multiple picking event types.

Solution

Create and implement trait

Testing

@alice-i-cecile alice-i-cecile added X-Uncontroversial This work is generally agreed upon D-Straightforward Simple bug fixes and API improvements, docs, test and examples A-Picking Pointing at and selecting objects of all sorts labels Sep 2, 2026

@alice-i-cecile alice-i-cecile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please cross-link this with the PointerEvent trait, and leave a doc comment explaining why they're not just one trait? :) I think I understand why, but it immediately came to mind and will be useful for others to understand the design.

Other than that, this LGTM.

@alice-i-cecile alice-i-cecile added the S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged label Sep 2, 2026
@laundmo

laundmo commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

aye, putting it here till i'm back at PC: they mostly overlap in which types they're implemented for but not 100%. notably some events don't have hitdata

@laundmo laundmo added the S-Adopt-Me The original PR author has no intent to complete this work. Pick me up! label Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Picking Pointing at and selecting objects of all sorts D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Adopt-Me The original PR author has no intent to complete this work. Pick me up! S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged X-Uncontroversial This work is generally agreed upon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants