Phaser API Documentation

<readonly> velocity: Phaser.Math.Vector2


The current velocity of the Pointer, based on its current and previous positions.

This value is smoothed out each frame, according to the motionFactor property.

This property is updated whenever the Pointer moves, regardless of any button states. In other words, it changes based on movement alone - a button doesn't have to be pressed first.

Since: 3.16.0
Source: src/input/Pointer.js (Line 177)