diff --git a/src/actor.rs b/src/actor.rs index 3297b10..cbbe7de 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -1151,12 +1151,14 @@ fn handle_atmosphere( } else { v.0 }; - let friction = dv * (1.0 - height).powf(4.0) / 4.0; + let friction = dv * (1.0 - height).powf(16.0) * dt * 10.0; v.0 -= friction; if distance < atmo.r_inner { let outward = (pos.0 - atmo_pos.0).normalize(); - let buoyancy = outward * (atmo.r_inner - distance) * dt * 10.0; + // depth is 0.0 on "surface" and 1.0 at center + let depth = ((atmo.r_inner - distance) / atmo.r_inner).clamp(0.0, 1.0); + let buoyancy = outward * depth.powf(4.0) * dt * 100_000.0; v.0 += buoyancy; }