cancel
Showing results for 
Search instead for 
Did you mean: 

UE4 Multiplayer

GreatOceanGames
Level 2

Hello all,

 

Has anyone managed to get the online subsystem working between 2 headsets yet ? I have been playing around for around a week and still no luck !. It seems to be to complicated for what it is surely there must be a step by step guide on how to successfully connect 2 headset together.

 

 

8 REPLIES 8

VintageGreen
Level 5

Hello there is no step to step guide sadly and the process is a pain in the ass but I got it working. First you will need to use Oculus source 4.26.3 and you will need to fix some code errors that prevent travel to the host headset from the client headset. But I will do my best to help you out so you don't waste months on this as I did.


Plugins/Online/OnlineSubsystemOculus/Source/Private

IPAddressOculus.h
Line 184

 

FString ToString(bool bAppendPort) const override
{
return FString::Printf(TEXT("%s.oculus"), *OculusId.ToString());
}

 

OculusNetDriver.cpp
Line 290

 

void UOculusNetDriver::LowLevelSend(TSharedPtr<const FInternetAddr> Address, void* Data, int32 CountBits, FOutPacketTraits& Traits)
{
if (bIsPassthrough)
{
return UIpNetDriver::LowLevelSend(Address, Data, CountBits, Traits);
}
//const FInternetAddr* AddressPtr = Address.Get();
//const FInternetAddrOculus* OculusAddr = StaticCast<const FInternetAddrOculus*>(AddressPtr);
//check(OculusAddr != nullptr);

FInternetAddrOculus OculusAddr(FURL(nullptr, *Address->ToString(false), ETravelType::TRAVEL_Absolute));
ovrID PeerID = OculusAddr.GetID();

 

Save and build.

 

Edit config files in project.

 

DefaultEngine.ini

 

[OnlineSubsystem]
DefaultPlatformService=Oculus
bHasVoiceEnabled=true

 

[OnlineSubsystemOculus]
bEnabled=True
OculusAppId="YOUR ID HERE"
MobileAppId="YOUR ID HERE"

 

[/Script/OnlineSubsystemOculus.OculusNetDriver]
ServerTravelPause=4.0

 

[/Script/OnlineSubsystemOculus.OculusNetDriver]
NetConnectionClassName="OnlineSubsystemOculus.OculusNetConnection"

 

[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/OnlineSubsystemOculus.OculusNetDriver",DriverClassNameFallback="/Script/OnlineSubsystemUtils.IpNetDriver")

 

[Voice]
bEnabled=True

 

[/Script/Engine.NetDriver]
AllowPeerConnections=False
AllowPeerVoice=False
ConnectionTimeout=60.0
InitialConnectTimeout=60.0
KeepAliveTime=0.2
RelevantTimeout=5.0
SpawnPrioritySeconds=1.0
ServerTravelPause=4.0
MaxPortCountToTry=512
bClampListenServerTickRates=true
MaxNetTickRate=90
NetServerMaxTickRate=90
LanServerMaxTickRate=90
NetClientTicksPerSecond=90
MaxClientRate=60000
MaxInternetClientRate=60000

 

[/Script/OnlineSubsystemUtils.IpNetDriver]
MaxClientRate=60000
MaxInternetClientRate=60000

 

[/Script/Engine.Player]
ConfiguredInternetSpeed=65000
ConfiguredLanSpeed=65000

 

DefaultGame.ini

 

[/Script/Engine.GameNetworkManager]
TotalNetBandwidth=600000
MaxDynamicBandwidth=60000
MinDynamicBandwidth=4000

 

[/Script/Engine.GameSession]
bRequiresPushToTalk=false

 

YourProject/Build/Android


Make sure you have your ExampleKey.keystore file in your Android folder in project.

*Optional after first build you can make a ManifestRequirementsOverride.txt in same location to make sure permissions are setup right don't worry about this now you will need to have a generated manifest for this in your intermediate folder.

 

 

 

VintageGreen
Level 5

why remove help mods?

VintageGreen
Level 5

Go to I had to recreate the post I made here because the mods removed it for reasons

https://www.reddit.com/r/unrealengine/comments/optd6y/the_secret_oculus_quest_2_multiplayer_guide/

VintageGreen
Level 5

I hope this helps 🙂

VintageGreen
Level 5

stupid mods deleted the fix and step to step guide I made sorry we live in a world of idiots

VintageGreen
Level 5

for **bleep** sakes

VintageGreen
Level 5

Mods just wasted 30 minutes of my **bleep**ing time

staniekmarcin
Level 3

Hi is this fix still ok on 4.27?