Skip to content

Commit

Permalink
improve Composite.car
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Dec 28, 2015
1 parent 6f89250 commit 5ff2182
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/factory/Composites.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,36 +259,30 @@ var Bodies = require('./Bodies');
collisionFilter: {
group: group
},
restitution: 0.5,
friction: 0.9,
frictionStatic: 10,
slop: 0.5,
friction: 0.8,
density: 0.01
});

var wheelB = Bodies.circle(xx + wheelBOffset, yy + wheelYOffset, wheelSize, {
collisionFilter: {
group: group
},
restitution: 0.5,
friction: 0.9,
frictionStatic: 10,
slop: 0.5,
friction: 0.8,
density: 0.01
});

var axelA = Constraint.create({
bodyA: body,
pointA: { x: wheelAOffset, y: wheelYOffset },
bodyB: wheelA,
stiffness: 0.5
stiffness: 0.2
});

var axelB = Constraint.create({
bodyA: body,
pointA: { x: wheelBOffset, y: wheelYOffset },
bodyB: wheelB,
stiffness: 0.5
stiffness: 0.2
});

Composite.addBody(car, body);
Expand Down

0 comments on commit 5ff2182

Please sign in to comment.