0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-12-26 13:49:01 -05:00

Merge pull request #51 from tumult/pair_refreshes_from_body_values

changed Pair.update to also update pair properties
This commit is contained in:
Liam 2014-12-05 00:02:07 +00:00
commit 7c1efb6185

View file

@ -51,6 +51,10 @@ var Pair = {};
activeContacts = pair.activeContacts;
pair.collision = collision;
pair.inverseMass = collision.bodyA.inverseMass + collision.bodyB.inverseMass;
pair.friction = Math.min(collision.bodyA.friction, collision.bodyB.friction);
pair.restitution = Math.max(collision.bodyA.restitution, collision.bodyB.restitution);
pair.slop = Math.max(collision.bodyA.slop, collision.bodyB.slop);
activeContacts.length = 0;
if (collision.collided) {