Hello everyone, I have a vehicle that was using physics for movement , in UE4 we used PhysX’s Rigid Bodies and applied forces on the vehicle and it was working fine, after migrating to UE5 I replaced the PhysX Rigid body with the body instance and used the appropriate corresponding functions, the vehicle seems to be working on fine on the server and on the client, except for a certain case when the speed of the vehicle on the SimulatedProxy instance reaches zero, after that the speed on the simulated proxy doesn’t change and it locks on zero, after moving randomly for a while with the vehicle the speed is updated and the SimulatedProxy instance is snapped to the Server’s correct location and everything goes back to normal.
I have checked the replication settings and it seems to be fine to me, the Actor is set to replicate and it replicates movement, At this stage I am not sure what could be the problem.
Being that physics are simulated on the server and clients separately, it sounds like the time it takes for the simulation to end, the server is predicting movement because the movement isn’t updating quick enough when it reaches zero. It’s still acting as if it needs to update location until it ends and snaps back to the correct place like you said. I would probably look at the tail end of my functions and see why it’s not updating the movement at that point because the server is still predicting when it shouldn’t. It seems that it doesn’t know when to correctly end the simulation…?
The problem is with the simulatedproxy client not the server, I forgot to mention that the server is the local controller I am testing on a Listen server, the problem is that the client somehow stop replicating the speed & angular speed of the server when it reaches zero.
I’ve not worked a lot with vehicle physics or even sure of the top of my head if there are physics constraints playing a role in this like they do on a character? Maybe it’s a small approximation that isn’t scope for it to be aware? Like the jitter you get when you simulate physics on a pawn where it’s physics body is essentially to loose? I doubt that helps, but just a thought.