Currently, i’m working on a multiplayer physics based shooter and have ran into a problem that has plagued me for weeks. I’ve done everything I can, however no matter what I do: AddForce is never consistent with the FPS in multiplayer. Let me break down my project…
All physics for players are calculated on the host/server (jumping, movement, crawling, etc.). This includes the ragdoll’s pose itself (which is then mirrored to the client via animation snapshots), Addforce nodes, Addtorque nodes, etc.
When the player has, say an FPS of 120 but the client has a FPS of 30- The client moves slightly slower than the host however the host moves at a normal speed. Now, if we invert this: the host is at 30 FPS but the client is 120- The host still moves perfectly fine however the client moves at insane unpredictable speed. If the FPS is the same on both, the movement is perfectly fine.
I’ve tried using Substepping, Changing the physics tick for the player actor, even built a version of Unreal that uses a Fixed Delta time (Not using it at this moment, just using normal UE4-27), used Deltatime multiplication, Tried to not use an axis value for movement as that supposedly is affected by FPS.
I’m stumped, and I’m wondering if any Unreal Physics masters know of any possible solutions?
All movement is handled on the host, and their position/location is sent back to the client.