magic numbers
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user