Skip to main content
Version: Phaser v4.0.0

Phaser.Physics.Arcade.Components.Mass

Scope: static

Source: src/physics/arcade/components/Mass.js#L7
Since: 3.0.0

Static functions

setMass

<instance> setMass(value)

Description:

Sets the mass of the physics body. Mass affects collision response -- heavier bodies push lighter ones more during collisions.

Parameters:

nametypeoptionaldescription
valuenumberNoThe new mass of the body. Must be a positive number.

Returns: Phaser.Physics.Arcade.Components.Mass - This Game Object.

Source: src/physics/arcade/components/Mass.js#L18
Since: 3.0.0