Fix panning

This commit is contained in:
Tobias Berger 2022-10-09 19:54:59 +02:00
parent 4d59288ec8
commit 4e163b7345
Signed by: toby
GPG key ID: 2D05EFAB764D6A88

View file

@ -529,17 +529,17 @@ fn generate_graphics(
});
}
_ = commands.spawn_bundle(Camera2dBundle::default());
_ = commands
.spawn_bundle(SpriteBundle {
.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()
})
.insert(Pan2d::new());
});
_ = commands
.spawn_bundle(NodeBundle {