Skip to content

Commit 1173f0d

Browse files
authored
Update documentation of HitData coordinates range in ui::picking_backend (#20465)
`HitData` coordinates now lie between `-0.5` and `0.5`. The documentation of the `ui::picking_backend` module still documents the old values of `0.0` and `1.0`.
1 parent b97d7c7 commit 1173f0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/bevy_ui/src/picking_backend.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
//! - `bevy_ui` can render on any camera with a flag, it is special, and is not tied to a particular
1919
//! camera.
2020
//! - To correctly sort picks, the order of `bevy_ui` is set to be the camera order plus 0.5.
21-
//! - The `position` reported in `HitData` is normalized relative to the node, with `(0.,0.,0.)` at
22-
//! the top left and `(1., 1., 0.)` in the bottom right. Coordinates are relative to the entire
23-
//! node, not just the visible region. This backend does not provide a `normal`.
21+
//! - The `position` reported in `HitData` is normalized relative to the node, with
22+
//! `(-0.5, -0.5, 0.)` at the top left and `(0.5, 0.5, 0.)` in the bottom right. Coordinates are
23+
//! relative to the entire node, not just the visible region. This backend does not provide a `normal`.
2424
2525
#![deny(missing_docs)]
2626

0 commit comments

Comments
 (0)