mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-23 09:26:51 -05:00
render normals pointing out of static bodies
This commit is contained in:
parent
8bf3278304
commit
d082b3adcc
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue