mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
fixes #78 revisited weight handycap
This commit is contained in:
parent
b6d67a0581
commit
e404ad3598
7 changed files with 27 additions and 16 deletions
|
|
@ -72,10 +72,7 @@ function (Parent, Box2D, Options, Settings, Exception, Nc) {
|
|||
var fixtureDef = new Box2D.Dynamics.b2FixtureDef();
|
||||
fixtureDef.shape = itemShape;
|
||||
|
||||
var offset = 4,
|
||||
factor = 80;
|
||||
var density = ((this.options.weight + offset) / this.options.width / this.options.height) * factor;
|
||||
fixtureDef.density = density;
|
||||
fixtureDef.density = this.options.weight;
|
||||
fixtureDef.friction = Settings.ITEM_FRICTION;
|
||||
|
||||
fixtureDef.restitution = this.options.bounce
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue