Phaser 3 equivilent of this example?

I have having trouble capturing right clicks in phaser 3. For Phaser2 there is a nice example here that makes it very clear: https://phaser.io/examples/v2/input/mouse-buttons. In Phaser 3 when I try the same code I get that the rightButton property is undefined.

Help is greatly appreciated.

https://labs.phaser.io/edit.html?src=src\input\mouse\right%20mouse%20button.js

There is a Phaser 3 right mouse button demo.

thanks!

looks like its as simple as

this.input.activePointer.rightButtonDown()
1 Like