min_height for bounce as a parameter
This commit is contained in:
parent
e80becdaee
commit
19cb1eb343
1 changed files with 1 additions and 1 deletions
2
Ball.cpp
2
Ball.cpp
|
@ -18,7 +18,7 @@ Ball::Ball(Point& _center, double _min_height, double _v_x, double _p, double _q
|
|||
}
|
||||
|
||||
void Ball::_compute_pos(double dt) {
|
||||
Center.z = fmax(0.0, A + B * crt_time - (G_CTE / 2) * crt_time * crt_time);
|
||||
Center.z = fmax(0.0, A + B * crt_time - (G_CTE / 2) * crt_time * crt_time + min_height);
|
||||
Center.x += dt * v_x;
|
||||
surface.update_center_pos(Center);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue