planck.js icon indicating copy to clipboard operation
planck.js copied to clipboard

log an error when a polygon exceeds maxPolygonVertices

Open clankill3r opened this issue 5 years ago • 0 comments

I had incomplete shapes:

Screen Shot 2019-07-04 at 23 23 04

After some digging I came to this fix: testbed.maxPolygonVertices = 48; // default is 12

It would be nice when creating a Polygon, e.g.

body.createFixture(pl.Polygon(vecs), 2.0);

That a issue is logged to the console if vecs.size > maxPolygonVertices.

clankill3r avatar Jul 04 '19 21:07 clankill3r