Skip to content

Commit

Permalink
Fixed box2d debug painter bug from recent box2d updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Irrelon committed Dec 7, 2013
1 parent 57ce5ab commit e10ff81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion engine/components/physics/box2d/IgeBox2dComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ var IgeBox2dComponent = IgeEventingClass.extend({

// Create the debug painter entity and mount
// it to the passed scene
new igeClassStore.IgeBox2dDebugPainter()
new igeClassStore.IgeBox2dDebugPainter(this._entity)
.depth(40000) // Set a really high depth
.drawBounds(false)
.mount(mountScene);
Expand Down
7 changes: 7 additions & 0 deletions engine/components/physics/box2d/IgeBox2dDebugPainter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
var IgeBox2dDebugPainter = IgeObject.extend({
classId: 'IgeBox2dDebugPainter',

init: function (entity, options) {
IgeObject.prototype.init.call(this);

this._entity = entity;
this._options = options;
},

tick: function (ctx) {
if (this._parent && this._parent.isometricMounts() === true) {
Expand Down

0 comments on commit e10ff81

Please sign in to comment.