From 4e163b734594b4976e6b4cb4e48c8f968c865a2d Mon Sep 17 00:00:00 2001 From: Tobias Berger Date: Sun, 9 Oct 2022 19:54:59 +0200 Subject: [PATCH] Fix panning --- src/main.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main.rs b/src/main.rs index ec0d105..c641506 100644 --- a/src/main.rs +++ b/src/main.rs @@ -529,17 +529,17 @@ fn generate_graphics( }); } - _ = commands.spawn_bundle(Camera2dBundle::default()); _ = commands - .spawn_bundle(SpriteBundle { - texture: images.get_handle(world_manager.map_image_handle_id.unwrap()), - sprite: Sprite { - custom_size: Some(custom_sprite_size), - ..default() - }, - ..default() - }) + .spawn_bundle(Camera2dBundle::default()) .insert(Pan2d::new()); + _ = commands.spawn_bundle(SpriteBundle { + texture: images.get_handle(world_manager.map_image_handle_id.unwrap()), + sprite: Sprite { + custom_size: Some(custom_sprite_size), + ..default() + }, + ..default() + }); _ = commands .spawn_bundle(NodeBundle {