-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit 4be7530
Add optional transparency passthrough for sprite backend with bevy_picking (#16388)
# Objective
- Allow bevy_sprite_picking backend to pass through transparent sections
of the sprite.
- Fixes #14929
## Solution
- After sprite picking detects the cursor is within a sprites rect,
check the pixel at that location on the texture and check that it meets
an optional transparency cutoff. Change originally created for
mod_picking on bevy 0.14
(aevyrie/bevy_mod_picking#373)
## Testing
- Ran Sprite Picking example to check it was working both with
transparency enabled and disabled
- ModPicking version is currently in use in my own isometric game where
this has been an extremely noticeable issue
## Showcase

## Migration Guide
Sprite picking now ignores transparent regions (with an alpha value less
than or equal to 0.1). To configure this, modify the
`SpriteBackendSettings` resource.
---------
Co-authored-by: andriyDev <[email protected]>1 parent 8c2c07b commit 4be7530Copy full SHA for 4be7530
File tree
0 file changed
+0
-0
lines changedFilter options
0 file changed
+0
-0
lines changed
0 commit comments