magic numbers

This commit is contained in:
Back777space
2025-04-06 00:59:06 +02:00
parent 75ed6c97ec
commit de69318f51

View File

@@ -90,9 +90,9 @@ pub fn init_player(
let window_size = Vec2::new(window.resolution.width(), window.resolution.height());
let sprite_size = Vec2::new(101.0, 101.0);
let scale = 2.2;
let scale = window.resolution.width() / 600.0;
let world_size = sprite_size * scale;
let offset = 70.0;
let offset = window_size.x / 4.0 - 40.0;
let mut transform = Transform::from_translation(
Vec3::new(window_size.x / 2.0 - world_size.x / 2.0 - offset, -window_size.y / 2.0 + world_size.y / 2.0, 0.0)