reduction of speed on x and z axis
This commit is contained in:
parent
2b1e9d192a
commit
afc7b4a3b9
1 changed files with 2 additions and 0 deletions
2
Ball.cpp
2
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;
|
||||
|
|
Loading…
Reference in a new issue