Skip to content

Commit fe864df

Browse files
committed
Merge branch 'arnemileswinter-patch-1'
2 parents bf0ab95 + c0858c5 commit fe864df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/pixel_border.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,23 @@ pub fn spawn_borders(mut commands: Commands, color: Res<BorderColor>) {
6161

6262
fn resize_borders(
6363
cameras: Query<
64-
(&PixelProjection, &Transform),
65-
Or<(Changed<PixelProjection>, Changed<Transform>)>,
64+
(&PixelProjection, &GlobalTransform),
65+
Or<(Changed<PixelProjection>, Changed<GlobalTransform>)>,
6666
>,
6767
mut borders: Query<(&mut Sprite, &mut Transform, &Border), Without<PixelProjection>>,
6868
) {
6969
if let Some((projection, transform)) = cameras.iter().next() {
7070
let z = projection.far - 0.2;
7171
let width = projection.desired_width.map(|w| w as f32).unwrap_or(0.0);
7272
let height = projection.desired_height.map(|h| h as f32).unwrap_or(0.0);
73-
let left = transform.translation.x
73+
let left = transform.translation().x
7474
+ if projection.centered {
7575
-(width / 2.0).round()
7676
} else {
7777
0.0
7878
};
7979
let right = left + width;
80-
let bottom = transform.translation.y
80+
let bottom = transform.translation().y
8181
+ if projection.centered {
8282
(-height / 2.0).round()
8383
} else {

0 commit comments

Comments
 (0)