I have a ball bouncing off a couple of walls at a reasonable speed. The ball has a density of 1.0 and radius of 0.05 or so. The walls are defined as static (density=0). The ball will bounce between the ball for a while then stop although it seemingly should have a great deal of kinetic energy remaining. Some data:
Speed from b2Vec2(0,0) to b2Vec2(0.012733,1.26057), diff = b2Vec2(-0.012733,-1.26057)
Speed from b2Vec2(0.012733,1.26057) to b2Vec2(0.0084887,-1.13451), diff = b2Vec2(0.00424435,2.39509)
Speed from b2Vec2(0.0084887,-1.13451) to b2Vec2(0.00282958,1.02106), diff = b2Vec2(0.00565912,-2.15558)
Speed from b2Vec2(0.00282958,1.02106) to b2Vec2(0.000943189,-0.918956), diff = b2Vec2(0.00188639,1.94002)
Speed from b2Vec2(0.000943189,-0.918956) to b2Vec2(0.000314397,-4.02938e-13), diff = b2Vec2(0.000628792,-0.918956)
The last line shows the Y-component dropping from -0.92 to -4e-13 (effectively stopping the ball), even though the previous step the speed change is about 0.09, and before that 0.11. Is this a known feature? Am I misunderstanding something?
The ball's restitution is 0.9, so I'd expect the change in speed to be comparable, and not drop by 0.92 suddenly.
Speed from b2Vec2(0,0) to b2Vec2(0.012733,1.26057), diff = b2Vec2(-0.012733,-1.26057)
Speed from b2Vec2(0.012733,1.26057) to b2Vec2(0.0084887,-1.13451), diff = b2Vec2(0.00424435,2.39509)
Speed from b2Vec2(0.0084887,-1.13451) to b2Vec2(0.00282958,1.02106), diff = b2Vec2(0.00565912,-2.15558)
Speed from b2Vec2(0.00282958,1.02106) to b2Vec2(0.000943189,-0.918956), diff = b2Vec2(0.00188639,1.94002)
Speed from b2Vec2(0.000943189,-0.918956) to b2Vec2(0.000314397,-4.02938e-13), diff = b2Vec2(0.000628792,-0.918956)
The last line shows the Y-component dropping from -0.92 to -4e-13 (effectively stopping the ball), even though the previous step the speed change is about 0.09, and before that 0.11. Is this a known feature? Am I misunderstanding something?
The ball's restitution is 0.9, so I'd expect the change in speed to be comparable, and not drop by 0.92 suddenly.