Set this Game Object to create and use a new Body based on the configuration object given.
Calling this methods resets all previous properties you may have set on the body, including plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
Either a string, such as circle, or a Matter Set Body Configuration object.
Optionaloptions: MatterBodyConfigAn optional Body configuration object that is used to set initial Body properties on creation.
Set this Game Objects Matter physics body to be a circle shape.
Calling this methods resets all previous properties you may have set on the body, including plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
The radius of the circle.
Optionaloptions: MatterBodyConfigAn optional Body configuration object that is used to set initial Body properties on creation.
Set this Game Object to use the given existing Matter Body.
The body is first removed from the world before being added to this Game Object.
Set this Game Objects Matter physics body to be a polygon shape.
Calling this methods resets all previous properties you may have set on the body, including plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle.
The number of sides the polygon will have.
Optionaloptions: MatterBodyConfigAn optional Body configuration object that is used to set initial Body properties on creation.
Set this Game Objects Matter physics body to be a rectangle shape.
Calling this methods resets all previous properties you may have set on the body, including plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
Width of the rectangle.
Height of the rectangle.
Optionaloptions: MatterBodyConfigAn optional Body configuration object that is used to set initial Body properties on creation.
Set this Game Objects Matter physics body to be a trapezoid shape.
Calling this methods resets all previous properties you may have set on the body, including plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
The width of the trapezoid Body.
The height of the trapezoid Body.
The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter.
Optionaloptions: MatterBodyConfigAn optional Body configuration object that is used to set initial Body properties on creation.
Enables a Matter-enabled Game Object to set its Body. Should be used as a mixin and not directly.