SetActorLocation Desync problem

Hey everyone,

So I’ve dealing with an issue that has been persistent in a multiplayer game I am developing. I developed a function that basically freezes a player at their current location for a second or so. I accomplished this by using SetActorLocation every tick and I had this function set to Run on Server. The issue is that when the Server uses the function in midair, I expected the client to see the Server floating in midair, but instead the Server player falls down to the ground on the Client’s side. Does anyone know why this is happening?

Does the client fall and then rubberband back up to the location or does it simply fall? I would recommend a multicast call that disables/enables gravity, sets the velocity to zero, and sets the actor’s location. Don’t try and fight the physics system. Work with it.

Ah right I should’ve mentioned, on the Client side, the Server player falls but when I go do something like look around the position is corrected on the client side but then it falls again. I’m going to attempt to fool around with some variable replication and see if that’s the case. I’ll also try doing a Multicast and see how that works out.

Alright it seems that Multicast-ing the Gravity change, Velocity change, and SetActorLocation worked! Thanks a lot!