From d082b3adcc10016e8b44c932fa03906ad0b2714a Mon Sep 17 00:00:00 2001 From: liabru Date: Mon, 2 Mar 2015 22:30:38 +0000 Subject: [PATCH] render normals pointing out of static bodies --- src/render/Render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/Render.js b/src/render/Render.js index 0b4d896..993f1ed 100644 --- a/src/render/Render.js +++ b/src/render/Render.js @@ -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);