mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Only change entity orientation when on the ground
This commit is contained in:
parent
e8aa654f01
commit
215a09005e
1
.gitignore
vendored
1
.gitignore
vendored
@ -34,3 +34,4 @@
|
||||
settings.ron
|
||||
run.sh
|
||||
screenshots
|
||||
todo.txt
|
||||
|
@ -141,8 +141,8 @@ impl<'a> System<'a> for Sys {
|
||||
}
|
||||
}
|
||||
|
||||
// Set direction based on velocity
|
||||
if Vec2::<f32>::from(vel.0).magnitude_squared() > 0.1 {
|
||||
// Set direction based on velocity when on the ground
|
||||
if Vec2::<f32>::from(vel.0).magnitude_squared() > 0.1 && a.on_ground {
|
||||
ori.0 = Lerp::lerp(
|
||||
ori.0,
|
||||
vel.0.normalized() * Vec3::new(1.0, 1.0, 0.0),
|
||||
|
@ -139,8 +139,8 @@ vec3 get_sky_color(vec3 dir, float time_of_day) {
|
||||
|
||||
float fog(vec2 f_pos, vec2 focus_pos) {
|
||||
float dist = distance(f_pos, focus_pos) / view_distance.x;
|
||||
float min_fog = 0.75;
|
||||
float min_fog = 0.5;
|
||||
float max_fog = 1.0;
|
||||
|
||||
return clamp((dist - min_fog) / (max_fog - min_fog), 0.0, 1.0);
|
||||
return pow(clamp((dist - min_fog) / (max_fog - min_fog), 0.0, 1.0), 1.7);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user