How to use MouseManager onMouseMove

I keep posting about Phaser 3 equivalents to Phaser 2 code but here is another one.

In Phaser 2 you could call a function when the mouse moved like this:
this.input.addMoveCallback(this.updateOnMouseMove, this);

Phaser 3 has the MouseManager with onMouseMove but I can’t find any examples how to use this. Is this what I should be using when I want to detect mouse movement?

Use POINTER_MOVE event of this.input.

1 Like