|
Hello all,
I am learning Box2D and I like it a lot. I have a problem with a simple object bouncing of the floor. I understand that setting restitution to 1.0f will make the object bounce to the same height (is this assumption correct?). What happens to me is the object keeps bouncing higher and higher. I would like it to bounce to the height I dropped it from.
I created a static body (set as edge) around the screen. I set gravity to 0.f, 9.8f. I created a ball as dynamic body and density = 1.0f, friction=0.0f, restitution = 1.0f.
What is that I am missing here?
Any help would be appreciated.
Thanks.
|