mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-27 09:50:52 -05:00
improve Composite.car
This commit is contained in:
parent
6f892502c2
commit
5ff218234a
1 changed files with 4 additions and 10 deletions
|
@ -259,10 +259,7 @@ var Bodies = require('./Bodies');
|
||||||
collisionFilter: {
|
collisionFilter: {
|
||||||
group: group
|
group: group
|
||||||
},
|
},
|
||||||
restitution: 0.5,
|
friction: 0.8,
|
||||||
friction: 0.9,
|
|
||||||
frictionStatic: 10,
|
|
||||||
slop: 0.5,
|
|
||||||
density: 0.01
|
density: 0.01
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -270,10 +267,7 @@ var Bodies = require('./Bodies');
|
||||||
collisionFilter: {
|
collisionFilter: {
|
||||||
group: group
|
group: group
|
||||||
},
|
},
|
||||||
restitution: 0.5,
|
friction: 0.8,
|
||||||
friction: 0.9,
|
|
||||||
frictionStatic: 10,
|
|
||||||
slop: 0.5,
|
|
||||||
density: 0.01
|
density: 0.01
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -281,14 +275,14 @@ var Bodies = require('./Bodies');
|
||||||
bodyA: body,
|
bodyA: body,
|
||||||
pointA: { x: wheelAOffset, y: wheelYOffset },
|
pointA: { x: wheelAOffset, y: wheelYOffset },
|
||||||
bodyB: wheelA,
|
bodyB: wheelA,
|
||||||
stiffness: 0.5
|
stiffness: 0.2
|
||||||
});
|
});
|
||||||
|
|
||||||
var axelB = Constraint.create({
|
var axelB = Constraint.create({
|
||||||
bodyA: body,
|
bodyA: body,
|
||||||
pointA: { x: wheelBOffset, y: wheelYOffset },
|
pointA: { x: wheelBOffset, y: wheelYOffset },
|
||||||
bodyB: wheelB,
|
bodyB: wheelB,
|
||||||
stiffness: 0.5
|
stiffness: 0.2
|
||||||
});
|
});
|
||||||
|
|
||||||
Composite.addBody(car, body);
|
Composite.addBody(car, body);
|
||||||
|
|
Loading…
Reference in a new issue