I’m making a combat attack that flings another character when you hit them, something like the old Gravitational Radiation Hammer, which never had latency due to FilteringEnabled not existing. I checked out a few games that have a similar mechanic, and some of them don’t appear to have any visual latency when you move another character, such as Fling Things and People.
I’ve tried everything I can think of:
- Applying an impulse force on the server with and without server network ownership
- No dice.
- Wrote my own physics loop that uses character:PivotTo() on the owning client.
- Replication latency was longer than the impulse force, broke air control, and isn’t easy to consider multiple hits on the same character
- Implemented attacking client sided prediction in that physics loop based on this blog post
- Attacking client simulates the victims physics until a remote event fired by the victim makes a round trip. Causes the character to complete a full arc, then instantly snap back to it’s start position for 200ms or so, then repeat the arc due to the owning client’s replication.
- Tried introducing reconciliation and interpolation to the prediction model
- Replication latency was so long in a 2 client Local Server test that it didn’t matter.
- I even tried running the attacking client’s simulation at half the speed of the owning client, that wasn’t enough either.
I really want to be able to just let the engine handle it after I ApplyImpulse(), so I’m hoping there’s some hacky trick I haven’t thought of yet to fix the attacking player’s feedback. I don’t have the time to spend on an entire in Luau character physics system similar to chickynoid, and using that in the past has proven extremely frustrating with state getting irreparably desynced/dropped, as well as the issue of it not being able to solve precise colliders on meshes.
Fling People and Things does it somehow, so there has to be a way. Have sunk nearly a week into what should be a rather simple mechanic.