Phaser API Documentation

  Version: 
setPosition([x], [y])

Description:

Sets the position of the physics body along x and y axes. Both the parameters to this function are optional and if not passed any they default to 0. Velocity, angle, force etc. are unchanged.

Parameters:

name type arguments Default description
x number <optional> 0

The horizontal position of the body.

y number <optional> x

The vertical position of the body.

Returns:
Description:

This Game Object.