From 39aa5b04b30c0bd6f6bc3b87af21160f2e3f93aa Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 19 Mar 2024 00:03:02 +0100 Subject: [PATCH] update dir. light to actually come from the sun thankfully we have only one star in the system, trisolaris would be annoying to code --- src/world.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/world.rs b/src/world.rs index 54c150f..2a43ca1 100644 --- a/src/world.rs +++ b/src/world.rs @@ -8,7 +8,7 @@ use bevy::core_pipeline::bloom::{BloomCompositeMode, BloomSettings}; use std::f32::consts::PI; const ASTEROID_SIZE: f32 = 100.0; -const MOON_SIZE: f32 = 50.0; +const MOON_SIZE: f32 = 200.0; const MARS_SIZE: f32 = 10.0; const ASTRONAUT_SIZE: f32 = 5.0; @@ -114,9 +114,9 @@ pub fn setup( mesh: sphere_handle.clone(), material: gray_handle.clone(), transform: Transform::from_xyz( + 2000.0, 0.0, 0.0, - -500.0, ).with_scale(Vec3::splat(MOON_SIZE)), ..default() }, @@ -217,12 +217,7 @@ pub fn setup( shadows_enabled: false, ..default() }, - transform: Transform::from_rotation(Quat::from_euler( - EulerRot::ZYX, - 0.0, - PI / 1.0, - -PI / 7.0, - )), + transform: Transform::from_rotation(Quat::from_rotation_y(PI/2.0)), cascade_shadow_config: CascadeShadowConfigBuilder { first_cascade_far_bound: 7.0, maximum_distance: 25.0,