Provides methods used for setting the debug properties of an Arcade Physics Body.
- Since: 3.0.0
- Source: src/physics/arcade/components/Debug.js (Line 7)
Members
-
debugBodyColor :number
-
The color of the body outline when it renders to the debug display.
Type:
- number
- Since: 3.0.0
- Source: src/physics/arcade/components/Debug.js (Line 98)
-
debugShowBody :boolean
-
Set to
true
to have this body render its outline to the debug display.Type:
- boolean
- Since: 3.0.0
- Source: src/physics/arcade/components/Debug.js (Line 56)
-
debugShowVelocity :boolean
-
Set to
true
to have this body render a velocity marker to the debug display.Type:
- boolean
- Since: 3.0.0
- Source: src/physics/arcade/components/Debug.js (Line 77)
Methods
-
setDebug(showBody, showVelocity, bodyColor)
-
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.
- Since: 3.0.0
- Source: src/physics/arcade/components/Debug.js (Line 15)
Returns:
This Game Object.
-
setDebugBodyColor(value)
-
Sets the color of the body outline when it renders to the debug display.
Parameters:
Name Type Description value
number The color of the body outline when rendered to the debug display.
- Since: 3.0.0
- Source: src/physics/arcade/components/Debug.js (Line 39)
Returns:
This Game Object.