Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
michalfialadev opened this issue Feb 28, 2022 · 0 comments

Comments

@michalfialadev
Copy link

michalfialadev commented Feb 28, 2022

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants