No mouse input value with pointer lock

Hello everyone!

I’m having a little problem with the mouse inputs. When the lock is deactivated, I have the mouse position but when the lock is activated, the function onMouseMove is called but the value remains fixed.

I use this.app.mouse.enablePointerLock() and this.app.mouse.on(pc.EVENT_MOUSEUP, this.onMouseMove, this);

Can anyone help me understand why this doesn’t work? Thank you.

After searching, I use window.addEventListener(“mousemove”, this.onMouseMove) instead of this.app.mouse.on(“mousemove”, this.onMouseMove, this).

With the pointer locked, this.app.mouse.on(“mousemove”) returns a fixed value for the cursor.