mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Improved orientation slerping
This commit is contained in:
parent
e5bcc8912e
commit
a324f01a1d
@ -120,7 +120,11 @@ impl<'a> System<'a> for Sys {
|
||||
&& (ori.0.normalized() - Vec3::from(ori_dir).normalized()).magnitude_squared()
|
||||
> 0.001
|
||||
{
|
||||
ori.0 = vek::ops::Slerp::slerp(ori.0, ori_dir.into(), 15.0 * dt.0);
|
||||
ori.0 = vek::ops::Slerp::slerp(
|
||||
ori.0,
|
||||
ori_dir.into(),
|
||||
if a.on_ground { 12.0 } else { 2.0 } * dt.0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ vec3 get_sky_color(vec3 dir, float time_of_day) {
|
||||
|
||||
vec3 sky_top = mix(
|
||||
mix(
|
||||
SKY_DUSK_TOP,
|
||||
SKY_DUSK_TOP + star,
|
||||
SKY_NIGHT_TOP + star,
|
||||
max(sun_dir.z, 0)
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user