November 30, 2021, 7:27pm
I have a super simple script that slowly rotates an object. It’s this single line of code in update():
this.entity.rotate(dt * 5, dt * 6, dt * 7);
The rotation “jitters” occasionally, every 20s or so. But if I change rotate() to rotateLocal() the problem goes away. The issue appears at the same rotation every time so it’s obviously tied to a certain combination of angles.
Here’s my test project, it’s completely empty except for two rotating cubes. Hit play and wait 20 seconds. What’s going on?
Unfortunately I am unable to reproduce the jittering on my end. I tried in Chrome and in Firefox. with the following specs:
OS: Windows 10 Pro
CPU: AMD Ryzen 9 3900X
GPU: Nvidia RTX 2070 SUPER
Resolution at Fullscreen: 1920x1080
Does you device differ greatly from mine? Could you post a video of the jitter you’re getting?
November 30, 2021, 8:38pm
Thanks for taking a look!
Here’s a video. This happens for me on Chrome, Edge and Brave.
It does NOT happen on my old Pixel 3 though
AMD Ryzen 9 4900HS
RTX 2060 MaxQ
Windows 10 Home
That is very strange behavior!
I wish I could help more, but with code that simple and a seemingly capable device, I’m really not sure. I tested it on a laptop I have handy with the following specs
OS: Windows 10 Pro
CPU: Intel i7-8565U
GPU: Intel UHD Graphics 620
Resolution at Fullscreen: 1920x1200
But was still unable to reproduce. Are your browsers up to date, or do you have any extensions that might somehow interfere with that function for some reason?
@MrOliv! I can confirm that I see the same behaviour on my laptop. (Intel i7-8750H CPU @ 2.20GHz, GeForce GTX 1060, 16 GB RAM).
Tested the project and oddly cannot reproduce.
Tested both in Firefox + MS Edge browsers
Tested both in 1920x1080 + 1366x768 resolutions
My gaming laptop’s specs:
Windows 10 OS:
Intel(R) Core™ i7-9750H CPU @ 2.60GHz (6 cores) CPU:
NVIDIA GeForce GTX 1650 + Intel(R) UHD Graphics 630 (dedicated + integrated) GPU:
32gb (originally 8gb) RAM:
November 30, 2021, 11:36pm
What are the refresh rates of your monitors that have the issue?
December 1, 2021, 12:11am
On my computer (which is having issues) the screen runs at 120hz.
My Pixel3 (which is not having these issues) I’m guessing 60fps
December 1, 2021, 12:19am
As a quick test, can you change the screen refresh rate to 60 and see if you having the same issues please?
December 1, 2021, 12:41am
So with the screen set to 60fps, rotate() is showing the same issues, but on the other hand the profiler is still showing 120fps.
However, if I put the computer in battery save mode and force it to run slower, the profiler dives down to 60fps and the problem goes away, regardless of 60/120 fps screen setting.
December 1, 2021, 1:42pm
I’ve managed to repro the issue by forcing a 120fps delta time here:
I’m not sure what could be causing the issue here for it to go backwards on the rotation. The engine code looks sensible.
I’ve created a ticket here:
I have no idea what could be causing the problem on this one unless at very small values, setFromEulerAngles does something odd?