February 21, 2021, 10:47pm
For some reason
mousemove sometimes gives events with wildly wrong
dy resulting in sudden jumps of the camera. This happens in Chrome (I’m using version 88) but I haven’t noticed it in Firefox.
The problem is present even in
First Person Movement Tutorial. I’ve recorded it:
I know how to mitigate it but I’m wondering if anyone knows why this happens and if it’s even a playcanvas thing.
February 22, 2021, 9:33am
I’ve not seen that before
I wonder if Chrome is doing something odd with dx/dy in the mouse event?
Hmm strange, I wasn’t able to reproduce on Chrome/Windows launching the sample project.
February 22, 2021, 1:03pm
hmm, I forgot to mention that in order to easily see it in the example project I had to reduce the mouse sensitivity. I did it by opening
the example in debug mode and changing the sensitivity via
pc.app.root.findByName('Player').script.firstPersonMovement.lookSpeed = 0.03
I think I am out of luck, used your console statement to reduce the speed to 0.03 but still it’s not happening here.
February 22, 2021, 1:59pm
February 22, 2021, 2:00pm
I can’t repro it either with the lower sensitivity.
As a silly suggestion, does this happen with another mouse or trackpad?
February 22, 2021, 7:55pm
@yaustar your suggestion wasn’t silly after all. When using a different mouse the behavior isn’t present.
It is weird that this only comes up on Chrome but I guess this isn’t too important knowing that other people with different mice don’t experience it.
Thank you guys for helping me out
February 22, 2021, 8:38pm
Did your original mouse come with any software/drivers that may change sensitivity or something along those lines?
February 22, 2021, 9:01pm
Yeah, I installed the latest drivers today but that didn’t change anything. I already ordered a new mouse so hopefully I’ll be fine