Right clic error onPointerMove


There is an error on pointerMove event :
onPointerMove(args: PointerEventData) {

If I press right click on onPointerMove args.button is 0, it’s 2 only when I Pointer Up. So I would like to exclude an action when i press my right click but it doesn’t work :confused:

Original Post on Discord

by user 224464722878005248

Hello there – we have an experimental AI bot :robot: that might be able to help you with your question. Would you like to try this out?

Okay I found a solution by using onPointerDown event

by user 224464722878005248

I prevent it by using a boolean from my onPointerDown to my onPointerMove

by user 224464722878005248

Hi, this will be fixed once our WebXR refactor lands - as a workaround what you can do until then i think is calling const isLeftButton = args.pointerId !== 0 && this.context.input.getIsMouse(args.pointerId)