Hello, I’m currently experiencing two problems with my multiplayer project, but I think they are related. I made the sessions, connections and spawning by following this. It might be important to state that I’m using the Oculus fork of Unreal and the project is for standalone VR and uses Handtracking (Which works after setting transforms and bone movement by RPCs), so, I’m using a custom pawn with a camera which moves with the headset and 2 hand components that move the hands.
- I have an Actor BP that’s set to replicates and replicate movement that’s set on the world, is not spawned by BPs. As it is set as replicated, I was expecting the actor to move on the client when the server moved it by default, but that’s not the case. The Actor stays where it spawned on the client. So, I said, “ok, I’ll move it myself”.
I made sure all the parents were calling their respective parent functions, because I read sometimes not having parent constructors could disable the replication.
- I can move it and change variables with RPCs but I read everywhere that Replicated variables and RepNotify are preferred, that’s where I’m stumbling because Replication in general seems not to be working on my project. First, I set my pawn variables to replicated, sent the input from the client to the server, set the new location of the actor at the server, expected the variables to change value and move the actor on the client, but neither of those happened. The variables keep being default on the client and the actor doesn’t move. I can even send the input FROM the client, and only the server’s actor moves.
The pawns that are having the variables replicated have the respective Player Controllers as owners, I made sure of it at the GameMode and also at begin play by printing it.
I tried with RepNotify, setting the variables at the server, expecting the event to trigger for the client, no OnRep works on the client, it does print for server only.
(These are some testing nodes so it’s easier to iterate than having to get the project to the headsets, I know I should pass the mouse information too, but that’s irrelevant right now given that the variables are not replicating)
I think I either setup something wrong on my Map or my project and that’s why nothing works how it should or the fork is borked, but I can’t find anyone else complaining about it.
So my question is, why is my replication not working at all? Any further information that you need, let me know.