Default sensitivity for the Unreal Engine 4 Editor added!
TheNoobPolice Premium Members April 1, 20215 yr Author stats Have you been able to decipher why so many games drop packets above 500hz with this engine?
DPI Wizard Wizard April 1, 20215 yr Wizard Author stats 19 minutes ago, TheNoobPolice said: Have you been able to decipher why so many games drop packets above 500hz with this engine? Yeah, it's the smoothing function that many devs leave on because it is on by default. In most cases it only affects 1000Hz, but in some cases also 500Hz and even 250Hz. I haven't invested any effort into deciphering exactly what it does, but what I could find in the documentation is this: Quote Smooth mouse movement, because mouse sampling doesn't match up with tick time. And tick time is described as Quote usually once per frame Which might also explain why some UE4 games have the sensitivity directly tied to the FPS. It's a horrible function and a mystery to me why it exist today, let alone being on by default. Mouse smoothing is an artifact from the past to try to fix issues with ball mouse. It solves nothing on modern computers, it only causes a bad user experience.
TheNoobPolice Premium Members April 2, 20215 yr Author stats Does seem strange why such a modern engine has chosen such antiquated defaults. I can only imagine they expect devs to be more interested in having a perfectly smooth camera presentation in all circumstances as more paramount than mouse input accuracy.
DPI Wizard Wizard April 2, 20215 yr Wizard Author stats 5 hours ago, yomi said: 104.000000 The default FOV is 90 if that's what you are quoting.
ugmoe Members April 19, 20214 yr Author stats On 4/1/2021 at 6:30 PM, DPI Wizard said: I haven't invested any effort into deciphering exactly what it does, but what I could find in the documentation is this: here is the function for mouse smoothing: aMouse = raw mouse input DeltaTime = real world time between previous and current tick (seconds) TimeDilation = in game time between previous and current tick (seconds) SampleCount = number of samples between previous and current tick (seconds/sample) void UPlayerInput::ClearSmoothing() { for ( int32 i=0; i<2; i++ ) { ZeroTime[i] = 0.f; SmoothedMouse[i] = 0.f; } const UPlayerInput* DefaultPlayerInput = GetDefault<UPlayerInput>(); MouseSamplingTotal = DefaultPlayerInput->MouseSamplingTotal; MouseSamples = DefaultPlayerInput->MouseSamples; } float UPlayerInput::SmoothMouse(float aMouse, uint8& SampleCount, int32 Index) { check(Index >= 0); check(Index < UE_ARRAY_COUNT(ZeroTime)); UWorld* World = GetWorld(); if (World) { check(World->GetWorldSettings()); const float EffectiveTimeDilation = World->GetWorldSettings()->GetEffectiveTimeDilation(); if (EffectiveTimeDilation != LastTimeDilation) { LastTimeDilation = EffectiveTimeDilation; ClearSmoothing(); } } const float DeltaTime = FApp::GetDeltaTime(); if (DeltaTime < 0.25f) { check(MouseSamples > 0); // this is seconds/sample const float MouseSamplingTime = MouseSamplingTotal/MouseSamples; check(MouseSamplingTime > 0.0f); if ( aMouse == 0 ) { // no mouse movement received ZeroTime[Index] += DeltaTime; // increment length of time we've been at zero if ( ZeroTime[Index] < MouseSamplingTime ) { // zero mouse movement is possibly because less than the mouse sampling interval has passed aMouse = SmoothedMouse[Index] * DeltaTime/MouseSamplingTime; } else { SmoothedMouse[Index] = 0; } } else { ZeroTime[Index] = 0; if ( SmoothedMouse[Index] != 0 ) { // this isn't the first tick with non-zero mouse movement if ( DeltaTime < MouseSamplingTime * (SampleCount + 1) ) { check(SampleCount > 0); // smooth mouse movement so samples/tick is constant aMouse = aMouse * DeltaTime/(MouseSamplingTime * SampleCount); } else { // fewer samples, so going slow // use number of samples we should have had for sample count SampleCount = DeltaTime/MouseSamplingTime; } } check(SampleCount >= 0); if (SampleCount == 0) { SmoothedMouse[Index] = 0; } else { SmoothedMouse[Index] = aMouse/SampleCount; } } } else { // if we had an abnormally long frame, clear everything so it doesn't distort the results ClearSmoothing(); } SampleCount = 0; return aMouse; }
ugmoe Members April 20, 20214 yr Author stats On 4/1/2021 at 6:30 PM, DPI Wizard said: I haven't invested any effort into deciphering exactly what it does, but what I could find in the documentation is this: here is the function for mouse smoothing: https://pastebin.com/LUSnPfat aMouse = raw mouse input DeltaTime = real world time between previous and current tick (seconds) TimeDilation = in game time between previous and current tick (seconds) SampleCount = number of samples between previous and current tick (seconds/sample) Just looking at this function, it shouldn't cause any problems, but there is one possibility. They added a framerate check at the beginning to see if the user's framerate drops below 4fps. If this check fails, it stops the smoothing "so it doesn't distort the results". It could be possible that the framerate drops and distorts the results but doesnt trigger the 4fps check. So like, it could drop to 5 fps and smoothing would not get disabled. I think the real culprit here is "Smooth Framerate" which is also in project settings but is not on by default. I'm guessing some developers turn it on while others dont and this somehow messes up the DeltaTime calculations, which this whole function is based on. I'm going to mess with all the settings and try to reproduce this problem. If i'm able to reproduce it, I could submit this as a bug report and it would almost certainly get fixed at some point, theyre really good about fixing bugs. For any UE4 developers that see this, I made a blueprint script that lets players enter their desired inches/360 and DPI, and gives them their sensitivity: https://blueprintue.com/blueprint/tqbz02_t/
Wheaks Members February 16, 20224 yr Author stats @DPI Wizard May I know what exactly FOVScaling and FOVScale's value does?
Wheaks Members February 16, 20224 yr Author stats Also, why does the fov rounds up to 120.691597 after I entered 120.691596?
DPI Wizard Wizard February 17, 20224 yr Wizard Author stats 3 hours ago, Wheaks said: @DPI Wizard May I know what exactly FOVScaling and FOVScale's value does? It's a multiplier to the FOV. 3 hours ago, Wheaks said: Also, why does the fov rounds up to 120.691597 after I entered 120.691596? In the calculator? Can you share a link?
Wheaks Members February 17, 20224 yr Author stats 1 hour ago, DPI Wizard said: It's a multiplier to the FOV. I mean how does the multiplier works? What happens if I uncheck FOVScaling? What's the difference between... let's say 0.1 and 0.2 of FOVScale value? 1 hour ago, DPI Wizard said: In the calculator? Can you share a link? In ue4 not the calculator
Wheaks Members February 19, 20224 yr Author stats If I changed the fov scaling to hor+ instead of ver-(original), Do I have to change the fov type in the calculator too? If yes, which one?
heckminth Members June 26, 20223 yr Author stats As a UE5 Dev, I just wanted to thank everyone in this thread for the help. I was having trouble with my sensitivity values, turned out mouse smoothing and FOV scaling were the culprits.
Recommended Comments
Create an account or sign in to comment