liabru / matter-js

a 2D rigid body physics engine for the web ▲● ■

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is the least expensive way to make bodies of different shapes smaller?

MaxMinimus opened this issue · comments

I'm using the circleRadius property to make circular bodies smaller. Are there similar properties for rectangles and polygons?

Scaling is not suitable because there is a large load on the processor.

Use surface

l^2 = S

where S is square surface

substitute r or S on code