# multiplayer multiplatform - possible replication issues with VR devices and mac or mobile

**URL:** <https://forums.unrealengine.com/t/multiplayer-multiplatform-possible-replication-issues-with-vr-devices-and-mac-or-mobile/2246322>\
**Category:** Programming & Scripting\
**Tags:** Mobile, SteamVR, oculus-vr, unreal-engine, Multiplayer, CPP\
**Created:** [December 27, 2024, 9:35pm UTC](https://forums.unrealengine.com/t/multiplayer-multiplatform-possible-replication-issues-with-vr-devices-and-mac-or-mobile/2246322 "2024-12-27T21:35:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![OrbitalZones](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/orbitalzones/32/1214470_2.png) [@OrbitalZones](https://forums.unrealengine.com/u/OrbitalZones)\
**Post date:** [December 27, 2024, 9:35pm UTC](https://forums.unrealengine.com/t/multiplayer-multiplatform-possible-replication-issues-with-vr-devices-and-mac-or-mobile/2246322/1 "2024-12-27T21:35:53Z")

</div>

I would like to make a multiplayer multiplatform game that connects players with all types of hardware, such as Windows PCs, Apple Macs, mobile devices and VR HMDs.  
My intention is that players of any platform will be seen by others as a third person character, much like with VRChat.

For VR players I have to inlcude OpenXR and/or the MetaXR plugin into my project. I am now wondering how you can now spawn and replicate data of VR characters on mac or mobile devices where these plugins are not available?

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [December 28, 2024, 5:39am UTC](https://forums.unrealengine.com/t/multiplayer-multiplatform-possible-replication-issues-with-vr-devices-and-mac-or-mobile/2246322/2 "2024-12-28T05:39:59Z")

</div>

that’s a very unspecific question. there are multiple ways to solve this.  
there are several dimensions where one could answer.

it would help if you try to make a proof of concept and find the specific issues you encounter.

you can have different pawns, and spawn selectively.  
or better, you can have one pawn, and enable/disable components depending on the target platform.  
that might require conditional compilation through compiler flags. (but i would be super careful with that.

you can put all your vr stuff in a component. and have that selectively compile. (e.g. functions that become stub on other platforms).

openxr will compile to windows just fine (and assume to mac) it just won’t do anything. (you can also deactivate the components).

i would personally go with having different components for different types of pawns. maybe have them inherit from a abse component, so that they the same api.

in any case you will need to do multiple builds.  
one for each platform.  
so you could simply do something similar to the platform specific includes that the engine uses. (see FGenericPlatform…)

---

<div class="post-metadata">

**Author:** ![OrbitalZones](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/orbitalzones/32/1214470_2.png) [@OrbitalZones](https://forums.unrealengine.com/u/OrbitalZones)\
**Post date:** [December 28, 2024, 9:16am UTC](https://forums.unrealengine.com/t/multiplayer-multiplatform-possible-replication-issues-with-vr-devices-and-mac-or-mobile/2246322/3 "2024-12-28T09:16:40Z")

</div>

Maybe have the wrong understanding here, but how can I disable components if they are not available at all? I am wondering why I can access OpenXR components like for motion controller on my mac, but cannot ‘see’ the additional inputs for the Oculus Touch controllers (thumb rest) or components for hand tracking?

Sure I have to do different builds. But how would you replicate hand tracking of a Quest VR pawn to a similar pawn on a mac client?

---

<div class="post-metadata">

**Author:** ![OrbitalZones](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/orbitalzones/32/1214470_2.png) [@OrbitalZones](https://forums.unrealengine.com/u/OrbitalZones)\
**Post date:** [December 28, 2024, 9:36am UTC](https://forums.unrealengine.com/t/multiplayer-multiplatform-possible-replication-issues-with-vr-devices-and-mac-or-mobile/2246322/4 "2024-12-28T09:36:35Z")

</div>

I think I will use something like a replication proxy, where changed variables of the character pawn are passed to a lokal proxy and then this one is replicated instead of the pawn itself.

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [December 30, 2024, 3:48am UTC](https://forums.unrealengine.com/t/multiplayer-multiplatform-possible-replication-issues-with-vr-devices-and-mac-or-mobile/2246322/5 "2024-12-30T03:48:03Z")

</div>

> [@OrbitalZones](#):
>
> But how would you replicate hand tracking of a Quest VR pawn to a similar pawn on a mac client?

honestly i’m struggling to understand your questions and your situation.  
but ill try anyway.  
i had some experience replicating vr, and what i had to do is _manually_ replicate the information.  
the transform of all the things that transforms.

on the vr client you get that transform automatically, but then i created an actor compontent that periodically sends that to the server (wiith a tick interval \> 0). (this is the autonomous proxy only)

the server then replicates that to the clients. with rep vars or multicast unreliable rpcs (careful with this (on one version of the engine i had issues with unreliable multicasts)).

the same component, on other clients (simulated proxies) will grab those transforms and tween them. with a tick interval closer to the fps (im actually using a custom significance plugin to manage their interval based on distance).

afaik even on vr to vr replication, youll have to replicate teh info manually. since it’s client based.  
since the component is custom, it matters not if the data comes from a vr client or a desktop or mobile.

beware that setting the transform on the server, for certain things, might make your stuff “stutter”.  
so i don’t set the transform on the server. (for now until i deal with that).

how do you disable something you don’t have? you dont. you add code that doesnt crash if it’s not there.  
as long as you can make a build that’s fine.

note that ive posted this before i came up with the final implementation (what ive described above)

> [@How to replicate VR movement](https://forums.unrealengine.com/t/how-to-replicate-vr-movement/657550/6):
>
> 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 FFastArraySerialize…

there’s a plugin also, but i’m decided to make my own code for it. you might get lucky with it, but beware that what a plugin gives you is all you can do (unless you are ready to modify it), so beware the pro/cons.

> [@How to replicate VR movement](https://forums.unrealengine.com/t/how-to-replicate-vr-movement/657550/2):
>
> Hi Erez, I’m unsure about the specifics of what’s happening here, but I wanted to mention the [VR Expansion Plugin](https://vreue4.com/features). It’s my observation that this plugin is basically a prerequisite to implementing VR multiplayer. Cheers!
