mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
8d78c37ce9
# Objective Fixes #15258 ## Solution If my understanding is correct, sprites with NaN anywhere in their transform won't even get onto the screen, so should not generate pick events. This PR filters sprites with NaN in their transforms before sorting by depth, then uses `FloatOrd` to simplify the comparison. Since we're guaranteed to not have NaN values, it's technically unnecessary, and we could instead sort with `a.partial_cmp(&b).unwrap()`, or even `unwrap_unchecked()`. ## Testing I ran the picking example to ensure Z sorting was working as intended. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |