Single/Multiplayer, Touch & Vive blueprint only Template

: Thanks for the update, what kind of issues are you facing with avatars multiplayer?

Avatars aside, did you ever try to use a third oculus touch for VR objects? Any clue how this should work?

The problem with Oculus Avatars is that Oculus made their 1.14 template for “testing purpose” only, meaning that Hands inputstate and headpose are sent to a memory buffer through opaque packets; then the “Avatar Remote” register itself in this datastream and retrieve/read the packets back into input state and headpose.

So what is easily done is spawning an avatar for each player and assign it the right OculusID. What I’ve been trying to do is send the inputs and transforms from the locally-controlled player to the right avatar, through replication and RPC. I’ve lost my soul doing it by code though custom class and /or mixing it with blueprints. The f""ing problem I always encounter one way or another is the opaque pointer to avatar packets, the former refusing to works with pointers of all sort. I even tried to do my own custom “packets” and replicate / RPC them but I again encounter the opaque pointers problem. Anyway, I asked to an Oculus engineer a few days ago about that and he said an update is coming soon. I’ll also examine attentively the SDK 2.0 coming tomorrow to see any interesting changes to Avatars replication. Anyway I’ll release what I’ve done tomorrow so PM me about that I would really like to finish that before Christmas.

For the 3rd controller if I’m right Oculus enabled that for mixed reality capture, right? You give me the idea to hack that and use it like a Vive Tracker, why not? I’ll try that!

I’ll release the 3.3 update for the Oculus-Steam, Oculus Avatars and Windows Mixed Reality somewhere this week. If someone wants to try the 3.3beta update for Steam-Oculus version, it’s live now on Microsoft OneDrive - Access files anywhere. Create docs with free Office Online. . For this template some minor changes, mostly on network speed and reliability. Some functions were calling other wrong functions, creating loops in some situations.

So there’s the 3.3 features and upcoming roadmap :cool:

Capture1.PNG

I am actually new to this.Tested the 3.3 beta and it worked really perfectly. Everyone who tested it for me was very impressed so far. Thanks a lotfor this incredibly useful framework.

Thanks! If everything is fine, I should post all templates tonight. Just want to test Oculus Dash now. I had a hard time with Windows Mixed Reality headsets; there are still major bugs when using Windows Store… More to come in the docs!

I have had more people test this and for Oculus/Vive testers everything worked very smoothly. What i noticed is that “NoHMDMode” somehow never worked for me. Not sure if it is ever triggered at all. I tried to bypass this by connecting the W,A,S,D controls by also connecting the “NoHMDMode” branch “false” node - then i somehow can control the pawn with keyboard for a few seconds, but shortly after the motion controller hands appear and controls are blocked again. Maybe I am doing something wrong. Not really important anyways as a VR game without HMD makes limited sense (Well i have one single “3D without HMD” user), but i always liked to use the keyboard controls for debugging and testing.

On a side-note: Would Side-By-Side stereo mode be possible? I have a user with an autostereoscopic screen (“Glasses free 3D”). I can start side-by-side mode using command line switch “game.exe -emulatestereo” - but i can’t control the eye seperation with this and the default settings are not so great.

I found a post about it, but it is in C++, not blueprint.

The “NoHMD” mode is very important (at least for me) to test features like multiplayer levels. In the version I just posted minutes ago, you’ll find more detailed instructions:

No HMD Mode
This mode is handy to test replication features without using an HMD / on a single computer
By default, you can use the following input:

  • W,A,S,D: Move along the X,Y 2D plane
  • Up, Down: Move along the Z plane
  • Left, Right: Rotate
  • C: Touch Y button/L Vive TrackPad Right
  • Spacebar: Touch A Button / R Vive TrackPad
  • LeftAlt: Touch B Button / R Vive TrackPad Right Button
  • X: L Touch Thumbstick Button / L Vive TrackPad Button
  • Z: R Touch Thumbstick Button / R Vive TrackPad Button
  • LeftCtrl: R Touch Hand Trigger / R ViveGrip
  • LeftShift: R Touch Index Trigger / R ViveTrigger

To test it, use Play this level; for multiplayer, use StandAlone Game with the following settings (suggested):


It is also suggested to use the LAN/Engine.ini file.

Also, to change stereo mode I must admit I never worked on this, but I would suggest to load a new level / spawn a fresh pawn or unposses / possess pawn with different stereo mode, because I would tend to think that doing that while using the camera of a pawn would break the game.

Latest Version 3.3
Latest release December 14, 2017

This template consists of virtual reality compatible pawn and settings, ready to drop in your single or multiplayer app. So what you can do is choose the features you want, and build yourself/modify a pawn based on the functionalities you need.

There are 4 versions:

**OneDrive is at Microsoft OneDrive - Access files anywhere. Create docs with free Office Online. **

  1. Steam Store/LAN/Direct IP/Oculus Store/Oculus Direct connection Version
  1. Oculus Store using Oculus Avatars Version
  1. Windows Store – Xbox Live
  1. Direct IP with VOIP

Which HMD works with the template / why 4 different versions?

  • The Steam/LAN is a blueprint-only template optimized for Oculus/Vive/WMR headsets, compatible with the latest Unreal Engine launcher version. Works with Steam Store, LAN, OculusDirect, DirectIP, Oculus Store (once references to Steam are removed)
  • The Oculus Store requires the Avatar plugin, thus requires compiling from Visual Studio; it also removes all references to Steam in order to be published on the Oculus Store.
  • The Windows Store is based on a branch of Unreal cured by Microsoft specifically tailored for Windows Mixed Reality headsets. The base template is blueprint only, but the Unreal Engine must be compiled from the Microsoft Dev/Mixed Reality GitHub.
  • The DirectIP with VOIP allows to use Direct with VOIP – following some plugin customization

Which Unreal Engine 4 version works with the template?

The template has been developed and tested with Unreal Engine 4.18.2 (Oculus/Steam and Oculus Avatars) and 4.16.2 Microsoft Dev/Mixed Reality branch

What’s new in version 3.3?

  1. Steam/LAN/Direct IP/Oculus Store/Oculus Direct connection Version
  • Fixed some functions which were mixed-up, causing lag<
  • Better logout functions
  • Oculus Dash compatible
  1. Oculus Store using Oculus Avatars Version
  • Updated to 4.18.2
  • Oculus Dash compatible
  1. Windows Mixed Reality Version
  • New template
  1. Direct IP with VOIP
  • Experimental template

OK i thought maybe my implementation or my PC at work - so I just tried the 3.3 beta template on my home computer and clicked on “play in current viewport”, also tried “New pie window” and “Play in standalone”. But none of the keys work - even though no HMD is connected.

I will download the new 3.3 you just posted and try again tomorrow. Any flag or parameter i have to set to enable the No HMD mode?

Hi , still thanks for this huge work!
I just want to report to you a bug which caused us some problems (still present on the last version).

In [FONT=courier new]MultiGM blueprint you have this part:

i.e. you call [FONT=courier new]DestroySession when a client is leaving the session, by passing the client’s [FONT=courier new]PlayerController ([FONT=courier new]MultiPC).
I think you are doing this with the purpose of destroying the session on client side.

The actual behavior, however, as reported also by another user here, is that the server destroys the session on its side (I’m trying to understand why this happens also by passing another user’s PlayerController). So after the first client has left the session, nobody else can see the server’s session anymore.
I removed this part and now all is working fine, clients can join and leave the same session many times without problems.

This problem has led us to have a long discussion here (just if you want further details).

Did you set boolean true at MainMenuPC/No HMD mode?

Thanks I’ll do a minor update this week
That and also Oculus Dash; to enable it correctly (it was wrongly written) you must have in Engine.ini:

[OnlineSubsystemOculus]
bEnabled=true
RiftAppId=yourappID

[Oculus.Settings]
bSupportsDash=true

Ah OK, I had set the boolean in the game instance and the AvatarMaster, my mistake. I WIll try that.

OK when i set the boolean in the MainMenuPC it actually works fine. Really great for debugging!

Thank you for this great VR template.
I managed to connect a Vive and a Rift on a local network.
I also got some sessions working on 3 or 4 occasions over the internet.
BUT most of the time the internet sessions don’t work because there is no session found.
Since it worked on a few occasions both with the HMD and the non HMD modes proves that my Steam configuration is fine.
What could be the reason that I am not able to connect over the internet ?

Hi @**masmil1988 ** @Fronzelneekburm Can you please share your working configuration ? Would appreciate.

For what works is

STEAM
[OnlineSubsystem]
DefaultPlatformService=Steam
bHasVoiceEnabled=true
PollingIntervalInMs=20
VoiceNotificationDelta=0.2

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
GameServerQueryPort=27015
bRelaunchInSteam=false
GameVersion=1.0.0.0
bVACEnabled=1
bAllowP2PPacketRelay=true
P2PConnectionTimeout=90
Achievement_0_Id=

[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName=“GameNetDriver”,DriverClassName=“OnlineSubsystemSteam.SteamNetDriver”,DriverClassNameFallback=“OnlineSubsystemUtils.IpNetDriver”)

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName=OnlineSubsystemSteam.SteamNetConnection

LAN/DEDICATED SERVER/DIRECT IP
[OnlineSubsystem]
DefaultPlatformService=NULL
bHasVoiceEnabled=true
PollingIntervalInMs=20
VoiceNotificationDelta=0.2
AllowPeerConnections=True
AllowPeerVoice=True

[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName=“GameNetDriver”,DriverClassName=“/Script/OnlineSubsystemUtils.IpNetDriver”,DriverClassNameFallback=“/Script/OnlineSubsystemUtils.IpNetDriver”)

OCULUS HOME
[OnlineSubsystem]
DefaultPlatformService=Oculus
PollingIntervalInMs=20
VoiceNotificationDelta=0.2

[OnlineSubsystemOculus]
bEnabled=true
RiftAppId=yourAppID

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

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

On Steam I have some days with excellent connections, other with trouble finding them. Don’t think it’s on our side.
Also, important on Win10, be sure to be on private network with sharing enabled (not doing so you won’t connect in LAN/Dedicated and can have trouble with Steam).

You can try also using a VPN, because it seems (my impression) that Steam region-lock users often (again, not sure if it’s true) :slight_smile:

AppID480 is the reason for most of those issues. Since I switched I’ve always been able to find the session, no region lock.

Question: From what I’ve gathered, the steam config settings will also work for directIP because of the config setting:

"DriverClassNameFallback=“OnlineSubsystemUtils.IpNetDriver”

Does that also change the platform in use to “null”?

I’m trying to wrap my head around how one build can work for several OnlineSubsystems and platforms. Is your workflow to change the config settings when packaging for Oculus vs Steam? I’m also wondering if you could describe in further how to achieve DirectIP with VOIP, the documentation states that the server code needs to change in the OnlineSubsystemNull plugin, which seems as if the host IP is hard coded? I went through the plugin but I wasn’t able to find where this code change needs to happen, or comments about it. Thanks!

Hi

Thank you very much for this amazing Template, really cool stuff! I have been looking for something like this for a while since I’m not that great at programming.

Unfortunately my knowIegde is reach when it come to changing the meshes for the blueprints, since I’m more from the design side. How can I change the mesh for one of the blueprints? (BP_PickupObject / BP_Interactable Actor) For example, you have the green Cube and the Key which are able to be picked up in VR Mode but there is only one Blueprint in the content browser(BP_PickupObject)
I duplicated the blueprint BP_Pickupobject and changed the static mesh with one of my own. When I picked up the mesh it was attached to my hand and I could put it down again.
So far a always duplicated the blueprint and changed the static mesh in the new bleuprint. I see now that tere is a better and more efficient way of doing it, unfortunately I just cant find where to change the mesh type.

Thank you very much for you help and this great programming work!

First of all, thanks a lot for making the VR template. It has been very helpful and has taught me a lot. I have experienced some bugs with it though. I am using the “VOIP” version 3.3 of the template. We are hosting the “VREssentialKitMap” using Internet(Steam). While everything works fine for the server, client is experiencing problems. The problems are,

  1. When the server does any action, like opening a door, turning a handle, pressing a button, opening a drawer etc, client does not see any changes.

  2. When the client tries to do any action, no change is seen on the client side, while the server can see the action happening. For example, when the client grabs and handle and pushes the door, server sees the door move, client does not see anything. Same with other action.

  3. The client can see the server picking up objects and the client can also pick up and throw objects. But, when a drawer is open and the server puts the cube in the drawer, the client sees it float for half a second and then sees it fall on the floor. While on the server, the cube is still in the drawer.

Note that, everything works 100% fine in the MultiMap.

These are the bugs that I have found. I hope my feedback helps in the next versions.

Hi , I’m almost sure you’ve already seen this post. But, if not, it could help to integrate Oculus avatars