Hello. Maybe depends on An issue with node.on(cc.Node.EventType.MOUSE_MOVE) v2.4.9 - #2 by muxiandong
There is the same problem. But now it happens on native mac os build. v3.7.3
@ccclass('MouseListener')
export class MouseListener extends Component {
protected onLoad() {
this.node.on(Node.EventType.MOUSE_MOVE, this.onMouseMove, this)
}
private onMouseMove(ev: EventMouse) {
console.log(ev.getButton())
}
}
Here ev.getButton()
returns -1
when the right mouse button is pressed.