reduction of speed on x and z axis

This commit is contained in:
Rémi Oudin 2018-02-13 12:46:47 +01:00
parent 2b1e9d192a
commit afc7b4a3b9

View file

@ -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;