mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'azymohliad/sun-movement-direction' into 'master'
Fix Sun and Moon movement direction See merge request veloren/veloren!1568
This commit is contained in:
commit
a189163910
@ -139,12 +139,12 @@ impl Globals {
|
||||
|
||||
pub fn get_sun_dir(time_of_day: f64) -> Vec3<f32> {
|
||||
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<f32> {
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user