diff --git a/Ball.cpp b/Ball.cpp index 9cef020..5e431b0 100644 --- a/Ball.cpp +++ b/Ball.cpp @@ -33,6 +33,8 @@ void Ball::_compute_pos(double dt) { double n_time = crt_time - stop_bouncing; Center.y = ((radius * (1.0 - exp(-n_time)) + radius)/2.) + (radius - ((radius * (1- exp(-n_time)) + radius)/2.)) * sin(5. * n_time); + v_x *= 0.99; + v_z *= 0.99; } Center.x += dt * v_x; Center.z += dt * v_z;