I have been having real problems troubleshooting my physics-based project, where everything seems to work differently based on your frame-rate. I should mention I’m quite new to game development (2-3 months), so any knowledge you can give me is well appreciated.
UE4 Version is 4.24.2. the game itself is single-player based.
The problem is basically this: 120 fps and everything works like it should -> the lower the fps goes, more faster everything physics-based seems to be. I have scoured forums reading about Delta-time and how you should use it to stabilize your physic-calculations, but that doesn’t seem to work (so I’m doing something really wrong - I know).
Link to movement blueprint
This is the basic gist of my current movement. As you can see I’ve tried multiplying it with delta seconds, but to no avail. Though I quite haven’t grasped the idea of delta-time.
My Pawn consist of Capsule collision (Simulates physics), and camera with spring arm component. I’m applying all the forces to that capsule.
So it’s meant to be First-person pawn with no visible mesh.
https://forums.unrealengine.com/core/image/gif;base64
I have 2 pawns which I can control (“astronaut-pawn” and “spaceship-pawn”), and both have identical physic-movement setup (force-based). Both pawns obviously have the same problem.
Video of the inconsistent turning speed. For clarification, I’m turning with constant speed, but toggling framerate from 60 to 25. the latter version has probably twice the turning speed. (I’m seeing a pattern here eh…)
Even my Particle-Effect is irregular size(???), depending on the fps which I can’t understand (It does have a Point Gravity parameter so maybe that’s the problem?).
Video About the particle Inconsistency. Again For clarification. First I’m throwing the projectile at 60fps, then at 25fps. The latter particle radius is almost twice the size of the 60 fps particle.
That isn’t even that bad, I gave a copy of this package to my friend (who has a bit slower computer), and the particle effect was absolutely broken (like all over the world broken.) How am I even supposed to handle that?
Also about the inconsistencies with Editor and packaged build. I have 120 fps in the editor while playing, and 120 fps in the packaged build, but still everything seems to be atleast 10x(ish) slower in the packaged build (it feels like sensitivity is all around slower, event with same consistent fps), is this the same problem? And what’s the fix for that?
Bonus problem: (not sure if related)
Every mesh I attach to my pawn starts to Jitter / Stutter when moving.
Video of the stuttering:
Things i have tried:
-Different ways of multiplying with delta-time.
-Sub-stepping in project settings, and fiddling with those settings.
-lowering net-update frequency, with lower t.maxfps (someone mentioned it on other thread)
If you have any other questions let me know.
Help is much appreciated.
UPDATE
By removing the delta-time node from the input calculations i have managed to get close enough results between 120 fps and 30 fps physics-movement. I have no idea why, but it seems to work, but since I don’t have a second computer it’s hard to know if it breaks as soon as someone else tries it… for some reason adding the delta-time only makes things more inaccurate, at least when using Addforce function through input axis event.