diff --git a/config.example.yml b/config.example.yml index 28d351b..d2e5037 100644 --- a/config.example.yml +++ b/config.example.yml @@ -1,7 +1,7 @@ hview_distance: 16 vview_distance: 16 world: "MountainIslands" -zoom_level: 0.0 +zoom_level: 0 wx: -1283.0 wy: 140.0 wz: -1752.0 diff --git a/crates/infinigen/src/lib.rs b/crates/infinigen/src/lib.rs index 882bd1f..0424be2 100644 --- a/crates/infinigen/src/lib.rs +++ b/crates/infinigen/src/lib.rs @@ -33,7 +33,7 @@ impl Plugin for AppPlugin { }); app.init_state::() .insert_resource(CameraSettings { - zoom_level: self.settings.zoom_level as f32, + zoom_level: self.settings.zoom_level, rotation_x: self.settings.rotation_x as f32, rotation_y: self.settings.rotation_y as f32, rotation_z: self.settings.rotation_z as f32, diff --git a/crates/plugins/src/camera/setup.rs b/crates/plugins/src/camera/setup.rs index a1918dc..3ac0bff 100644 --- a/crates/plugins/src/camera/setup.rs +++ b/crates/plugins/src/camera/setup.rs @@ -7,7 +7,7 @@ use bevy_flycam::FlyCam; #[derive(Resource)] pub struct CameraSettings { - pub zoom_level: f32, + pub zoom_level: i8, pub rotation_x: f32, pub rotation_y: f32, pub rotation_z: f32, @@ -18,7 +18,7 @@ pub struct CameraSettings { } pub fn setup(mut commands: Commands, settings: Res) { - let zoom = 2f32.powf(settings.zoom_level); + let zoom = 2f32.powf(settings.zoom_level as f32); let mut transform = Transform::from_xyz(settings.wx * zoom, settings.wy * zoom, settings.wz * zoom); transform.rotation.x = settings.rotation_x;