How to replicate VR movement

Hi there, I am new in this specific engine so bear in mind that I might be missing something basic.
I am using the VRTemplate, and then setting the VRPawn to replicate:


Unfortunately when I start a multiplayer game players don’t see the other player’s hands/headset moving. I guess that the replication does not work that way but I couldn’t figure out what’s wrong exactly. I also noticed that only the headset’s static mesh appears in the VRPAWN and I can’t find the hand controller mesh in my project files which is super weird because they definitely appear in game, where are they?

Thanks in advance

1 Like

Hi Erez,

I’m unsure about the specifics of what’s happening here, but I wanted to mention the VR Expansion Plugin. It’s my observation that this plugin is basically a prerequisite to implementing VR multiplayer.

Cheers!

1 Like

The hands are populated by the headset itself I think. Its a plugin thing. It gets the controller model related to the headset and spawn them. If does not find it, them will spawn the default.

Try adding a simple mesh and set it to replicate. See if it works. I manage to make it work by adding a simple static mesh of a box on top of the player, under the camera component of the VR player pawn.

Hi Erez, did you ever figure out how to replicate the movement of the controllers and the headset for the other players to see?

This specific package was made in a way that doesn’t replicate, you can either build your own implementation or use VRE by mordental

I also needed this.
After a bit of research i found that the best is to send the data via rpc to the server, and let the server replicate.

someone on discord helped me clarify this. and also a friend who knows about it.

" Vaei: The absolute minimum information you need to send is Location and Rotation The usable minimum probably also includes Velocity and possibly Acceleration.
It would be good practice to compress the information in some manner also - possibly using an FFastArraySerializer so you only replicate what/when you need - after you have it working.
This should all be contained within a struct.
Then you send it from Client (Auth) → Server via unreliable RPC on Tick.
And the server Replicates this data with COND_SimulatedOnly. Client auth is very simplistic.

Vaei: … (about replicating variables). replication is server to client only. So the client must send the information in an RPC instead of using replication. But then the server can replicate that to all other clients (i.e COND_SimulatedOnly)"