Skip to content

Commit 88cd83a

Browse files
committed
Fixed bug in PhysicsEditorParser where it would allow non-clockwise vertices through
1 parent 1d827c9 commit 88cd83a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/physics/matter-js/PhysicsEditorParser.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ var PhysicsEditorParser = {
120120

121121
for (var v = 0; v < vertexSets.length; v++)
122122
{
123+
Vertices.clockwiseSort(vertexSets[v]);
124+
123125
parts.push(Body.create(Common.extend({
124126
position: Vertices.centre(vertexSets[v]),
125127
vertices: vertexSets[v]

0 commit comments

Comments
 (0)