This commit is contained in:
Jeena 2014-02-10 22:22:14 +01:00
parent 89c5e4a5d8
commit ed23753c04
17 changed files with 286 additions and 224 deletions

View file

@ -19,8 +19,8 @@ function (Parent, Box2D, Settings, Exception) {
var bodyDef = new Box2D.Dynamics.b2BodyDef();
bodyDef.type = Box2D.Dynamics.b2Body.b2_staticBody;
bodyDef.position.x = this.options.x * Settings.TILE_SIZE / Settings.RATIO;
bodyDef.position.y = this.options.y * Settings.TILE_SIZE / Settings.RATIO;
bodyDef.position.x = (this.options.x * Settings.TILE_SIZE + Settings.TILE_SIZE / 2) / Settings.RATIO;
bodyDef.position.y = (this.options.y * Settings.TILE_SIZE + Settings.TILE_SIZE / 2) / Settings.RATIO;
bodyDef.angle = (this.options.r || 0) * 90 * Math.PI / 180;
return bodyDef;