sugarlabs / physics

a box2d playpen
GNU General Public License v3.0
7 stars 26 forks source link

Bouncy objects bounce higher and higher #28

Closed quozl closed 1 year ago

quozl commented 7 years ago

The object will fall and bounce, and will not gain any rotational momentum.

Some objects eventually stop moving.

Large objects bounce higher and higher each time.

sparshg commented 1 year ago

With the basketball setting, we set restitution=1, a circle bouncing should not gain any rotational momentum since there isn't any force acting in the horizontal direction. (Centre of mass is aligned with the point of contact). But it should bounce to the same height.

I think this is more of a Box2D limitation since there are many numerical approximations while Box2D solves for constraints and differential equations. What we can do is set the restitution=0.95 or something so that the system doesn't gain energy and become unstable. What do you think? @chimosky

chimosky commented 1 year ago

I think this is more of a Box2D limitation since there are many numerical approximations while Box2D solves for constraints and differential equations. What we can do is set the restitution=0.95 or something so that the system doesn't gain energy and become unstable. What do you think? @chimosky

A PR showing your hypothesis would be a good idea.