From c0a793bc97763a5a3f09191b9b520c2bc6e6f9d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Oudin?= Date: Tue, 13 Feb 2018 22:20:58 +0100 Subject: [PATCH] Reduction of speed on the ground --- Ball.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Ball.cpp b/Ball.cpp index 9b13459..1e2496b 100644 --- a/Ball.cpp +++ b/Ball.cpp @@ -35,6 +35,8 @@ void Ball::_compute_pos(double dt) { Center.y = min_height + ((min_rad * (1.0 - exp(-n_time)) + min_rad )/2.) + (min_rad - ((min_rad* (1- exp(-n_time)) + min_rad)/2.)) * sin(5. * n_time); + v_x *= 0.8; + v_z *= 0.8; } Center.x += dt * v_x; Center.z += dt * v_z;