don't flip sprites twice (#18535)
# Objective - After #17041, sprite flipping doesn't work ## Solution - Sprite flipping is applied twice:b6ccc2a2a0/crates/bevy_sprite/src/render/mod.rs (L766-L773)
b6ccc2a2a0/crates/bevy_sprite/src/render/mod.rs (L792-L799)
- Keep one
This commit is contained in:
parent
b6ccc2a2a0
commit
70c68417f0
@ -789,15 +789,6 @@ pub fn prepare_sprite_image_bind_groups(
|
||||
);
|
||||
}
|
||||
|
||||
if extracted_sprite.flip_x {
|
||||
uv_offset_scale.x += uv_offset_scale.z;
|
||||
uv_offset_scale.z *= -1.0;
|
||||
}
|
||||
if extracted_sprite.flip_y {
|
||||
uv_offset_scale.y += uv_offset_scale.w;
|
||||
uv_offset_scale.w *= -1.0;
|
||||
}
|
||||
|
||||
let transform = extracted_sprite.transform.affine()
|
||||
* Affine3A::from_scale_rotation_translation(
|
||||
quad_size.extend(1.0),
|
||||
|
Loading…
Reference in New Issue
Block a user