update dir. light to actually come from the sun

thankfully we have only one star in the system, trisolaris would be
annoying to code
This commit is contained in:
yuni 2024-03-19 00:03:02 +01:00
parent c86d51fe92
commit 39aa5b04b3

View file

@ -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,