Reduction of speed on the ground
This commit is contained in:
parent
61ef03e955
commit
c0a793bc97
1 changed files with 2 additions and 0 deletions
2
Ball.cpp
2
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.) +
|
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. *
|
(min_rad - ((min_rad* (1- exp(-n_time)) + min_rad)/2.)) * sin(5. *
|
||||||
n_time);
|
n_time);
|
||||||
|
v_x *= 0.8;
|
||||||
|
v_z *= 0.8;
|
||||||
}
|
}
|
||||||
Center.x += dt * v_x;
|
Center.x += dt * v_x;
|
||||||
Center.z += dt * v_z;
|
Center.z += dt * v_z;
|
||||||
|
|
Loading…
Reference in a new issue