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
true
if the body is static, otherwisefalse
for a dynamic body.- Since: 3.0.0
- Source: src/physics/matter-js/components/Static.js (Line 34)
Returns:
true
if the body is static, otherwisefalse
.- Type
- boolean
-
setStatic(value)
-
Changes the physics body to be either static
true
or dynamicfalse
.Parameters:
Name Type Description value
boolean true
to set the body as being static, orfalse
to make it dynamic.- Since: 3.0.0
- Source: src/physics/matter-js/components/Static.js (Line 17)
Returns:
This Game Object.