Skip to content

Commit

Permalink
render normals pointing out of static bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Mar 2, 2015
1 parent 8bf3278 commit d082b3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/Render.js
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ var Render = {};
normalPosY = (pair.activeContacts[0].vertex.y + pair.activeContacts[1].vertex.y) / 2;
}

if (collision.bodyB === collision.supports[0].body) {
if (collision.bodyB === collision.supports[0].body || collision.bodyA.isStatic === true) {
c.moveTo(normalPosX - collision.normal.x * 8, normalPosY - collision.normal.y * 8);
} else {
c.moveTo(normalPosX + collision.normal.x * 8, normalPosY + collision.normal.y * 8);
Expand Down

0 comments on commit d082b3a

Please sign in to comment.