Phaser API Documentation

  Version: 
setDebug(showBody, showVelocity, bodyColor)

Description:

Sets the debug values of this body.

Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole. Note that there is a performance cost in drawing debug displays. It should never be used in production.

Parameters:

name type description
showBody boolean

Set to true to have this body render its outline to the debug display.

showVelocity boolean

Set to true to have this body render a velocity marker to the debug display.

bodyColor number

The color of the body outline when rendered to the debug display.

Returns:
Description:

This Game Object.

Examples:
Since: 3.0.0