Phaser API Documentation

  Version: 
deltaXFinal()

Description:

The change in this Body's horizontal position from the previous game update.

This value is set during the postUpdate phase and takes into account the deltaMax and final position of the Body.

Because this value is not calculated until postUpdate, you must listen for it during a Scene POST_UPDATE or RENDER event, and not in update, as it will not be calculated by that point. If you do use these values in update they will represent the delta from the previous game frame.

Returns:
Description:

The final delta x value.

Type:
  • number
Since: 3.22.0