Provides methods used for getting and setting the static state of a physics body.
- Since: 3.0.0
- Source: src/physics/matter-js/components/Static.js (Line 9)
Methods
-
isStatic()
-
Returns
trueif the body is static, otherwisefalsefor a dynamic body.- Since: 3.0.0
- Source: src/physics/matter-js/components/Static.js (Line 34)
Returns:
trueif the body is static, otherwisefalse.- Type
- boolean
-
setStatic(value)
-
Changes the physics body to be either static
trueor dynamicfalse.Parameters:
Name Type Description valueboolean trueto set the body as being static, orfalseto make it dynamic.- Since: 3.0.0
- Source: src/physics/matter-js/components/Static.js (Line 17)
Returns:
This Game Object.
