Skip to content

Conversation

bytemunch
Copy link
Contributor

Objective

Updates the now inaccurate position docs
Fixes #17832

Solution

From
The position of the intersection in the world, if the data is available from the backend.
To
The position reported by the backend, if the data is available. Position data may be in any space (e.g. World space, Screen space, Local space), specified by the backend providing it.

Testing

uhh reading :)

@alice-i-cecile
Copy link
Member

@notmd, how's this?

@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward A-Picking Pointing at and selecting objects of all sorts labels Feb 13, 2025
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Feb 13, 2025
Copy link
Contributor

@notmd notmd left a comment

Choose a reason for hiding this comment

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

This is much more clear. Maybe we can add which space is used in each backend/plugin? About the normalize value for UI, I think we should use the non normalized value instead. In web it is https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/offsetX which use quite often. The normalized value can easily be computed from non normalized one.

@alice-i-cecile
Copy link
Member

Normalized values of the clicks in UI is quite helpful for building widgets, while non-normalized value is usually just the mouse position 🤔 That's for a different thread though; maybe spin up an issue?

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 13, 2025
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 13, 2025
Merged via the queue into bevyengine:main with commit 610fe51 Feb 13, 2025
35 checks passed
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 C-Docs An addition or correction to our documentation D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HitData docs don't accurately describe the behavior of UI picking
3 participants