Min_height evolves in time.
This commit is contained in:
parent
c0a793bc97
commit
0db091f76e
1 changed files with 2 additions and 0 deletions
2
Ball.cpp
2
Ball.cpp
|
@ -83,6 +83,8 @@ void Ball::update_pos(double dt) {
|
||||||
_compute_T_n();
|
_compute_T_n();
|
||||||
_compute_v_x(normal);
|
_compute_v_x(normal);
|
||||||
_compute_v_z(normal);
|
_compute_v_z(normal);
|
||||||
|
min_height = fmin(radius, min_height + 0.2 * (radius - min_height));
|
||||||
|
std::cout << "U:" << U << "\n";
|
||||||
max_t = (T - old_t)/2.0 + old_t;
|
max_t = (T - old_t)/2.0 + old_t;
|
||||||
|
|
||||||
if (((A + B * max_t - (G_CTE / 2) * max_t * max_t + min_height) < radius)) {
|
if (((A + B * max_t - (G_CTE / 2) * max_t * max_t + min_height) < radius)) {
|
||||||
|
|
Loading…
Reference in a new issue