Phaser API Documentation

  Version: 
smoothFactor: number

Description:

The smoothing factor to apply to the Pointer position.

Due to their nature, pointer positions are inherently noisy. While this is fine for lots of games, if you need cleaner positions then you can set this value to apply an automatic smoothing to the positions as they are recorded.

The default value of zero means 'no smoothing'. Set to a small value, such as 0.2, to apply an average level of smoothing between positions. You can do this by changing this value directly, or by setting the input.smoothFactor property in the Game Config.

Positions are only smoothed when the pointer moves. If the primary button on this Pointer enters an Up or Down state, then the position is always precise, and not smoothed.

Type:
number
Default: 0
Since: 3.16.0
Source: src/input/Pointer.js (Line 225)