This commit is contained in:
yuni 2024-04-24 19:59:14 +02:00
parent 4c26f2ef4f
commit b5878802a3
2 changed files with 6 additions and 1 deletions

View file

@ -43,7 +43,6 @@ impl Plugin for CameraPlugin {
.after(PhysicsSet::Sync)
.before(TransformSystem::TransformPropagate));
app.insert_resource(MapCam::default());
//app.insert_resource(DirectionalLightShadowMap { size: 4096 });
}
}
@ -117,6 +116,10 @@ pub fn setup_camera(
}.into(),
..default()
});
commands.insert_resource(DirectionalLightShadowMap {
size: settings.shadowmap_resolution,
});
}
pub fn sync_camera_to_player(

View file

@ -60,6 +60,7 @@ pub struct Settings {
pub rotation_stabilizer_active: bool,
pub shadows_sun: bool,
pub shadows_pointlights: bool,
pub shadowmap_resolution: usize,
pub key_selectobject: MouseButton,
pub key_zoom: MouseButton,
pub key_map: KeyCode,
@ -172,6 +173,7 @@ impl Default for Settings {
rotation_stabilizer_active: true,
shadows_sun: true,
shadows_pointlights: false,
shadowmap_resolution: 2048,
key_selectobject: MouseButton::Left,
key_zoom: MouseButton::Right,
key_map: KeyCode::KeyM,