Phaser API Documentation

  Version: 
renderBodyAxes(bodies, graphics, showAxes, lineColor, lineOpacity)

Description:

Renders either all axes, or a single axis indicator, for an array of Bodies, to the given Graphics instance.

The debug renderer calls this method if the showAxes or showAngleIndicator config values are set.

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

Parameters:

name type description
bodies array

An array of bodies from the localWorld.

graphics Phaser.GameObjects.Graphics

The Graphics object to render to.

showAxes boolean

If true it will render all body axes. If false it will render a single axis indicator.

lineColor number

The line color.

lineOpacity number

The line opacity, between 0 and 1.

Since: 3.22.0