How to add right click functionality to object?

Hey There,

trying to figure out how to detect right click. any help would be greatly appreciated. i have an object function running this:

this.setInteractive({useHandCursor: true })
  .on('pointerover', () => 
    {
        debugtext.x = Math.ceil(game.input.mousePointer.x/64)*64;
        debugtext.y = Math.ceil(game.input.mousePointer.y/64)*64-64;
        if (this.mined < 8) {
            debugtext.setText(`id: ${this.tID} \nin: ${this.mined}`);
        }
        else{
            debugtext.setText(`id: ${this.tID} \nin: full`);
        }
    })
    .on('pointerdown', () => 
    {
        if (this.mined < 8) {
            this.mined++;
            console.log("ID: ", this.tID, "mined: ",this.mined);
            debugtext.setText(`id: ${this.tID} \nin: ${this.mined}`);
        }
        else{
            debugtext.setText(`id: ${this.tID} \nin: full`);
        } 
        
    })
    .on('rightButtondown',() =>
    {
        console.log('rightclick');
    });

Hey first of all welcome and i saw that there is an example on labs.phaser.io - input\mouse maybe you would like to check that :slight_smile:

thanks! will give it a try.