The following article talks about enabling the new network physics system.
When I simply turn on the physics prediction as the article says to do, my vehicle gets a PC_NetworkPhysicsComponent added to it. It will go away when I disable physics prediction and recompile the vehicle BP.
The problem I am experiencing is that when this component is automatically added, the Chaos Vehicle Movement Component no longer functions - the vehicle no longer moves.
It seems to me that I need them both if I want to use the Chaos Vehicle Movement Component and I want to replicate physics for non vehicle actors.
Can anyone point out what I need to do to correct this behavior or any documentation on the topic?
Enable physics prediction and resimulation in project settings.
On vehicle actor bp, Physics Replication Mode to Resimulation (WIP).
Then on Event Possessed in Vehicle BP, run a custom event Multicast and pass it the controller ref from Event Possessed and do Set Owner.
When you do this i can now drive vehicles again on client.
And other clients see the vehicle moving properly, from short test i did the driving looked quite smooth without any further tunning.
Lmk if this helps/works.
Edit : Did some further testing and quickly the clients were out of sync and did not sync back up. If i figure it out and get consistent and good results ill post a update. But at least it moves.
Final edit :
It works, using predictive interpolation on actor bp for physic replication mode and the rest is same as before. I tried my hardest to get them out of sync, crashing into each other, jumping off ramps etc. Couldnt do it thus far.
Tried what you listed. Setting the Owner did nothing. When multicasting, a null ref was sent to other clients. I don’t think that was even necessary, but again I am using 5.3.2.
With Resimulation and the server vehicle being possessed, the client vehicles followed, but were dramatically choppy, which is not usable.
With Predictive Interpolation, the Clients would update the position of the vehicle only when it stopped and came to rest for over 1 sec.
Thanks for trying. I will keep a ref to this info if I decided to try in 5.4.
EDIT:
When I was typing this reply above, I had closed the UE project and it crashed. I then went back in to try again, and it worked with Pred-Inter, but it never kept correct sync between the original Client and the Server. I had Replicate Physics to Autonomous Proxy off. The other Client followed the Server quite well.
Turning Replicate Physics to Autonomous Proxy on, the Server and Autonomous Client are fully in sync. But the downside is it has some jerkiness to it.
In the video clip below, the Autonomous Client is Client 2 in the bottom right, the Server is on the top. Only the server seems smooth. The Autonomous Client is the one where the player is driving, so it must be smooth. The others could be explained away as poor netcode. This is happening because the Autonomous Client is getting adjusted by the server and is therefore not truly autonomous.
And I don’t know why, but often the project crashes when i close it, even if i just run the game but i don’t edit anything.
While it seems to work well in most cases, once the vehicle moves far enough from its spawn point, the proxy vehicles become unstable, as you can see in the video below.