Phaser API Documentation

renderConvexHull(body, graphics, hullColor, [lineThickness])


Renders the Convex Hull for a single Matter Body to the given Phaser Graphics Game Object.

This method is used internally by the Matter Debug Renderer, but is also exposed publically should you wish to render a Body hull to your own Graphics instance.


name type arguments Default description
body MatterJS.BodyType

The Matter Body to be rendered.

graphics Phaser.GameObjects.Graphics

The Graphics object to render to.

hullColor number

The color used to render the hull.

lineThickness number <optional> 1

The hull line thickness.


This Matter World instance for method chaining.

Since: 3.22.0