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.
name | type | arguments | description |
---|---|---|---|
width | number |
The width of the trapezoid Body. |
|
height | number |
The height of the trapezoid Body. |
|
slope | number |
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. |
|
options | Phaser.Types.Physics.Matter.MatterBodyConfig | <optional> |
An optional Body configuration object that is used to set initial Body properties on creation. |
This Game Object instance.