[SOLVED] Camera jitters if move mouse quickly

I encountered this problem when making an FPV project, and I find this even in the official tutorial project, which is, if you move your mouse quickly, the camera would jitters as if it was canceling your mouse movement.

Since this problem exhibits in the official projects, I don’t even konw if this is only my problem or a generic one? How do I solve this?

I’m trying this on Chrome on Windows and not seeing any jitter even when spinning my trackball like mad.

Could you do a recording or describe how the camera is jittering?

Do you have a multi monitor setup?

Tried it with another computer and it works fine… So this problem must have something to do with my computer or mouse driver… weird.

https://www.youtube.com/watch?v=kzdBgLYnh_0

Just to give you guys a look at what an annoying problem I am facing.

I switched a mouse and closed the mouse driver but its still here, any advice?

Interesting. What browser and OS are you using? It looks like the ‘pointer’ is moving out of the canvas hence the ‘mouse cancel’.

It’s latest chrome and Win10 pro

Is there anything unique about your PC setup? eg

  • Are you using an special extensions?
  • Do you have a drawing tablet installed?
  • Any mouse software that manipulates the mouse pointer?
  • Does this happen incognito mode?

Nothing really special here :frowning:
Cant find a single clue.

Ok… I have fully tested this thing on different computers, and here is what I got:

So looks like this is a Windows + Chrome exclusive problem… I will use firefox from now on

Odd, it was fine on my Windows and Chrome combo :confused:

I wonder if it has anything to do with Windows display scaling? I’ve had odd behaviour with Chrome generally and display scaling before when used multiple displays.

Interesting, I’ve had similar issues on both of my computers before as well, even in demos such as After the Flood. Once I had that issue in a project, and I decided to do some debugging. It turns out that the mouse move event was sometimes generating large values in the wrong direction at random intervals if the mouse was locked to the screen.

Here’s an example of the error. The screen is showing x and y coordinates from mouse move events with the cursor locked, after moving the mouse slowly up and left for a while.

this.app.mouse.enablePointerLock();

After moving the mouse consistently up and left for a while, I suddenly got a mouse event going down and right by a lot. This has happened on multiple computers. The simple demo I made can be found here.

@will @dave Any idea what could be causing this? I’ve so far seen this error on multiple devices.

Open an issue on GitHub I guess?

That simple demo shows a 404. Is it private?

Sorry, I accidentally deleted that one, but I re-created it again here.

1 Like

I find that this problem doesn’t show on my Win10 latop using Chrome Stable (Version 63.0.3239.132). I’m wondering - can you see whether this problem also occurs in Chrome Canary? If not, it’s a bug Google has already fixed. I’m very confident this is a browser issue and almost certain this isn’t anything to do with PlayCanvas itself.

A way to confirm this is to write a super-simple vanilla (non-PlayCanvas) HTML page that uses the mouse lock API and then reads the mouse. If you can repro this in an isolated, simple page, and Google haven’t fixed this already in Canary, you should let them know about it:

https://bugs.chromium.org/p/chromium/issues/list

Ah, I just tested it again and it appears to work fine now. Mistake on my part for assuming it was a mistake with playcanvas!

1 Like