Phaser API Documentation

  Version: 
useDamping: boolean

Description:

If this Body is using drag for deceleration this property controls how the drag is applied. If set to true drag will use a damping effect rather than a linear approach. If you are creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in the game Asteroids) then you will get a far smoother and more visually correct deceleration by using damping, avoiding the axis-drift that is prone with linear deceleration.

If you enable this property then you should use far smaller drag values than with linear, as they are used as a multiplier on the velocity. Values such as 0.05 will give a nice slow deceleration.

Type:
boolean
Default: false
Since: 3.10.0