From 8a6f08df919e235dba722d9044767966175b0d50 Mon Sep 17 00:00:00 2001 From: Andrii Zymohliad Date: Fri, 27 Nov 2020 23:17:59 +0200 Subject: [PATCH] Fix sun & moon movement direction They were rising on the west and setting on the east --- voxygen/src/render/pipelines/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voxygen/src/render/pipelines/mod.rs b/voxygen/src/render/pipelines/mod.rs index 9338250bab..ac23906e00 100644 --- a/voxygen/src/render/pipelines/mod.rs +++ b/voxygen/src/render/pipelines/mod.rs @@ -139,12 +139,12 @@ impl Globals { pub fn get_sun_dir(time_of_day: f64) -> Vec3 { let angle_rad = Self::get_angle_rad(time_of_day); - Vec3::new(angle_rad.sin(), 0.0, angle_rad.cos()) + Vec3::new(-angle_rad.sin(), 0.0, angle_rad.cos()) } pub fn get_moon_dir(time_of_day: f64) -> Vec3 { let angle_rad = Self::get_angle_rad(time_of_day); - -Vec3::new(angle_rad.sin(), 0.0, angle_rad.cos() - 0.5).normalized() + -Vec3::new(-angle_rad.sin(), 0.0, angle_rad.cos() - 0.5).normalized() } }