maze walls
This commit is contained in:
@@ -66,7 +66,10 @@ pub fn init_player(
|
||||
angular_damping: 1.0,
|
||||
},
|
||||
GravityScale(3.0),
|
||||
Transform::from_xyz(0.0, 1.0, 0.0),
|
||||
Transform::from_xyz(0.0, 0.5, 0.0),
|
||||
GlobalTransform::default(),
|
||||
InheritedVisibility::default(),
|
||||
ViewVisibility::default(),
|
||||
))
|
||||
.with_children(|parent| {
|
||||
parent.spawn((
|
||||
@@ -87,13 +90,13 @@ pub fn init_player(
|
||||
},
|
||||
RenderLayers::layer(STATIC_LAYER),
|
||||
));
|
||||
|
||||
|
||||
let window_size = Vec2::new(window.resolution.width(), window.resolution.height());
|
||||
let sprite_size = Vec2::new(101.0, 101.0);
|
||||
let sprite_size = Vec2::new(101.0, 101.0);
|
||||
let scale = window.resolution.width() / 600.0;
|
||||
let world_size = sprite_size * scale;
|
||||
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