Namespace: Bounce

Phaser.Physics.Impact.Components. Bounce

The Impact Bounce component. Should be applied as a mixin.

Since: 3.0.0
Source: src/physics/impact/components/Bounce.js (Line 7)

Members


bounce :number

The bounce, or restitution, value of this body. A value between 0 (no rebound) and 1 (full rebound)

Type:
  • number
Since: 3.0.0
Source: src/physics/impact/components/Bounce.js (Line 50)

Methods


setBounce(value)

Sets the impact physics bounce, or restitution, value.

Parameters:
Name Type Description
value number

A value between 0 (no rebound) and 1 (full rebound)

Since: 3.0.0
Source: src/physics/impact/components/Bounce.js (Line 16)
Returns:

This Game Object.

Type
Phaser.GameObjects.GameObject

setMinBounceVelocity(value)

Sets the minimum velocity the body is allowed to be moving to be considered for rebound.

Parameters:
Name Type Description
value number

The minimum allowed velocity.

Since: 3.0.0
Source: src/physics/impact/components/Bounce.js (Line 33)
Returns:

This Game Object.

Type
Phaser.GameObjects.GameObject