mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Fix animate_scale scaling z value in text2d example (#9769)
# Objective I noticed this while testing #9733. It's not causing any problems, but we shouldn't teach users to scale 2d stuff in z. ## Solution Only scale in x and y.
This commit is contained in:
parent
ca46d7c357
commit
8681d1cb04
1 changed files with 4 additions and 1 deletions
|
@ -187,6 +187,9 @@ fn animate_scale(
|
|||
// rendered quad, resulting in a pixellated look.
|
||||
for mut transform in &mut query {
|
||||
transform.translation = Vec3::new(400.0, 0.0, 0.0);
|
||||
transform.scale = Vec3::splat((time.elapsed_seconds().sin() + 1.1) * 2.0);
|
||||
|
||||
let scale = (time.elapsed_seconds().sin() + 1.1) * 2.0;
|
||||
transform.scale.x = scale;
|
||||
transform.scale.y = scale;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue