Phaser API Documentation

  Version: 
setVelocity(x, y, [step])

Description:

Sets the velocity of each Group member.

Parameters:

name type arguments description
x number

The horizontal velocity.

y number

The vertical velocity.

step number <optional>

The velocity increment. When set, the first member receives velocity (x, y), the second (x + step, y + step), and so on.

Returns:
Description:

This Physics Group object.

Since: 3.0.0