Wrong Ui Node Position when using Val::Percent with bigger UiScale
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
[886a256](https://github.com/bevyengine/bevy/commit/886a2560d24ac248776eea11afabaccfbafa58f4)
## What you did
Spawned a NodeBundle with some values based on Percent.
```rust
commands.spawn(NodeBundle {
style: Style {
position_type: PositionType::Absolute,
height: Val::Percent(50.),
width: Val::Percent(50.),
right: Val::Percent(0.),
..Default::default()
},
background_color: BackgroundColor(Color::WHITE),
..Default::default()
});
```
## What went wrong
The size is not as expected, for example, if I have `Style::right` as `Val::Percent(0.)`, I expect that the Node were in the border of the window
Result images with different `UiScale` (The number at the bottom is the actual scale)




## Additional information
This is related to how the `ui_layout_system` round the Positions, together with the fact that the `Camera` is also transformed by the scale, causes a situation where the rounding causes big gaps.
Also related to #11207
Contributor guide
Assessment
This issue has not been assessed yet.