According to user manual, restitution is defined like this:
I'm wondering why.
My physics knowledge is very weak, but this behaviour doesn't look realistic at all to me: it would mean that an elastic ball [with restitution=1] colliding against an elastic table will bounch as much as the same ball colliding against a mud puddle, while in the latter case it shold just stop.
Something like:
intuitively sounds better to me (in this case two mud-balls [restitution=0] colliding against each other will have the same effect as a mud-ball colliding against an elastic ball, yet this sounds a lot more realistic to me), but if restitution is defined the other way, I guess I'm missing something...
Code:
restitution = b2Max(shape1->restitution, shape2->restitution);
I'm wondering why.
My physics knowledge is very weak, but this behaviour doesn't look realistic at all to me: it would mean that an elastic ball [with restitution=1] colliding against an elastic table will bounch as much as the same ball colliding against a mud puddle, while in the latter case it shold just stop.
Something like:
Code:
restitution = shape1->restitution * shape2->restitution
intuitively sounds better to me (in this case two mud-balls [restitution=0] colliding against each other will have the same effect as a mud-ball colliding against an elastic ball, yet this sounds a lot more realistic to me), but if restitution is defined the other way, I guess I'm missing something...