phaser icon indicating copy to clipboard operation
phaser copied to clipboard

pointer.leftButtonReleased() while holding RMB on DRAG_END reports false (wrong), instead of true (correct) value

Open michalfialadev opened this issue 2 years ago • 0 comments

Version

3.55.2

Windows 10

Description

.... .on(Phaser.Input.Events.DRAG_END, this.OnSceneDragEndHandler, this) ....

private OnSceneDragEndHandler(
    pointer: Phaser.Input.Pointer,
    gameObject: Phaser.GameObjects.GameObject): void
{
    // true if LMB was released and RMB was not held, false if LMB was released while RMB was held (!!!)
    console.log("pointer.leftButtonReleased()=",pointer.leftButtonReleased())
    // false if LMB was released and RMB was not held, false if LMB was released while RMB was held
    console.log("pointer.rightButtonReleased()=",pointer.rightButtonReleased())
}

Additional Information

The correct behavior would be to report pointer.leftButtonReleased() as true when LMB is released, while RMB, MMB, FWDMB, BACKMB (or any other buttons, keys, etc) are held. Pretty sure there are other permutations, where this might be causing problems, like holding LMB and releasing RMB (or other keys). Lastly, its expected this to work through other triggers (not just DRAG_END).

michalfialadev avatar Feb 28 '22 09:02 michalfialadev