Single/Multiplayer, Touch & Vive blueprint only Template

Sorry for the question, but it seems i cant find where to change the color and size of the right controller´s ray.

Thanks in advance!

F.

@malcriado Should be in the details tab of MotionControllerBP under Debugging

No lucky for me, there is no Debugging section on the MotionControllerBP details

@malcriado I should have been more specific. In MotionControllerBP, inside WidgetInteraction component, in the Details tab:

I find the hand system in both the Epic VR_Template and this to be overly complicated, and it makes customization very difficult (at least for me). Perhaps I’m not clear on the reasons, but why does the Avatar spawn and attach BP_MotionController actors, which in turn spawn meshes for the hands. I’m not expert at accessing things buried deep and spawned with my own custom stuff.

Why not just have the hands in the avatar, removing a great deal of complexity (and in my case, confusion) about where things should be placed? An Avatar with an HMD camera and a mesh for the head under it. Then MotionController components with hand meshes/grabSpheres under them?

What I’ve done is to replace the avatar with my own that is fully contained for clarity/simplicity. However I seem to not have all the replication working. What parts would I need to reproduce from the AvatarMaster and MotionControllerBP to get it to replicate properly? I’ve done the obvious of carrying over the “Networking Replication” section and set Custom Events to be run on server. Some of it works, but hands aren’t playing back properly on client views.

@MPC-

Excellent question.
For the single player it would be possible to put everything in the pawn class.
For multiplayer, the server needs first to spawn and replicate the class containing all controller-related functions.
Also, always good practices to have all functions working together in their own class.

Finally I’m releasing soon a version which I think will be bug free, having tested it for hours in different environnement and with 2 to 4 players.
I redesigned a lot of functions network-wise.
I simplified functions and put more comments. Stay tuned in a few days.

I would like to change materials on the avatar based on a level change that I’m doing in the gameMode. I’ve found that the host materials change fine, but the clients are not. Any thoughts on how to do that?

Context: I’m learning Epic myself only for the last few months so might not be the best way to do this
Inside the MotionControllerBP,
Created a Integer Variable and Rep Notified it (Mines Called GloveType),

Then in the OnRep_GloveType Function

changematerial.png,

Create a Custom Event Replicated Run on Server, With an Integer Input for new Glove type,
have that event Set w/ Notify GloveType Variable.

Calling the Custom Event from the Avatar_Master to both BPMC2LEFT and BPMC2RIGHT,

I have this mapped to the grip function to change gloves depending on what gloves I’m holding, but I guess it should be easy enough to work out how to do it from the gamemode.

(Hope the picture comes through ok first time I’ve uploaded a picture).

Liquidgands, thank you!!! This is working for me on the client side now!

@Liquidgands @MPC-

I think the most reliable way to to it is to have the function changing the property inside the object blueprint. As an example, in my latest iteration I change the color of the hands and the material associated with the Vive Controller mesh in their respective blueprint. So in motioncontrollerbp I have:

And in CVR_Hand_BP and ViveController_BP I have:

This way it should always be replicated client-side. Furthermore, materials such as Dynamic Material Instances won’t be replicated with your method :slight_smile:

Note: Forgot to tell that HANDSREP is a direct reference to CVR_Hand_BP:
Capture3.PNG

Did you already look into this? I can’t seem to get it fixed

@SenseiHaketon Not fixed yet. This has been logged as UE-44947 at Unreal Engine Issues and Bug Tracker (UE-44947) .

Thanks again for all the help! This has been so very helpful in getting our first online/lan experience working! Any word on Oculus Online subsystem integration?

i am trying to understand what " Oculus Direct Connect" actually do.
Form Bp it seems only launching a new level named as “Oculus ID.oculus”.
i dont have a oculas . only htc vive. So cnnot try it on my side.
[FONT=Arial Black]Can anybody explain the " Oculus Direct Connect"?

@Muzaheed

How to use the Oculus Direct Connect:

To connect to another player map via the Oculus Network
Everybody must be connected to the Oculus Network with an Oculus Rift
The first player becomes the listen-server via the usual “Host Game” via Steam/Oculus
Other player (clients) can connect to the map via the Oculus Direct Menu, by entering the 16-digits numbers of the player which is the listen-server.

Everybody who has an Oculus account has an 16-digits Oculus ID. To easily find it it is shown on the Oculus Direct Menu.

All this allow you to use the Oculus Network, as opposed to using Steam or LAN.

Finding a friend’s session via the menu “Find a Match via Steam or LAN” won’t work with the Oculus Network.

Functions pertaining to finding friends’ sessions through the Oculus Network are already found within Unreal, but they are not exposed to blueprints.

The good news is that I’ll release a mini-plugin that will go along the version 3 of the template which will do the following thing:

  • Enable the use of Oculus Avatars and all template pawn’s functions
    " Enable finding friend’s sessions through Oculus Network
  • Enable VOIP over the Oculus Network

Version 3.0 - June 21, 2017 - SinglePlayer/Multiplayer

**What’s new in version 3.0?
**

  • Update to Unreal 4.16.1
  • Everything has been redone from the ground. Rather than adapting Epic’s VR template, all functions have been redone with multiplayer in mind. Almost lost my mind doing it but it’s done.
  • VR Tracker: The mesh has been changed for a very simple one, preventing cooking problems. Adding/removing Vive Trackers is now working well whether the owner is a listen-server or a client.
  • The grabbing functions and interactive objects are now fully compatible with the VR Essential Kit (included).
  • Major multiplayer optimization has been done, with very good replication on fast connections.
  • All bugs related from previous version solved.
  • Works Single or Multiplayer
  • Oculus Avatar: pre-wiring done, integrate with my mini-plugin “ Avatars” if present (soon)
  • Inclusion of a 3rd person “Test Pawn”, for debugging and do all kind of tests

A note on delays
Delays have been put in the AvatarMaster and MotionControllerBP Initialization Functions. You can try to remove or shorten them, but remember that it may prevent functions to execute on the proper order on different systems. A suggestion is to “hide” pawn initialization with a fade in or a loading screen.

Known problems

  • Extra Sphere collision is shown when using debug shapes including the debug line for the widget interaction component. This is an issue currently related to the 4.16.1 version. By disabling Instanced Stereo the bug goes away. This has been logged as UE-44947 at Unreal Engine Issues and Bug Tracker (UE-44947) .
  • VR Essential Kit won’t work with clients in multiplayer mode. I’ll have to review/rethink @jamis ‘s excellent work to enable interactions with clients.
  • Physics objects: It’s normal to experience client-side lag on physics objects (i.e. Interactive Objects). Many tricks exist to fix that problem; search for “multiplayer physics objects”. This would be an entire different topic and is not specifically related to VR.

What’s coming just down the road:

  • Oculus Network: I had a working version done for version 4.15, but happy fellows at Epic changed the way Oculus friend’s lists are retrieved on the oculus Network, with version 4.16. Working on that should be fixed in days. Fix will include:
  • Enabling the use of Oculus Avatars and all template pawn’s functions
  • Enabling finding friend’s sessions through Oculus Network
  • Enabling VOIP over the Oculus Network

Now let’s work on VR Audio spatialization!

Sounds great! Downloading it now :wink:

@xN31 Tell me if there’s any bugs. I have been testing this one for an extended period of time!

Amazing work! Huge thanks!

Sure! We haven’t been testing it for long yet, but so far we had some issue in finding session with both the Oculus and Steam backends (also the pre-built version many times doesn’t find any session… my guess is too many people are using the SteamVR test ID at the same time with other applications and UE4 only retrieves a subset of the sessions)
Also, when using the version 3.0 I see a strange green reflection in SSR if enabled (let aside SSR is not the best thing in VR, this was not happening before :wink:

Reading the release notes I get Oculus Avatars need a separate plugin release to work with 3.0, is this correct? Do you have any ETA for it?

Thanks in any case for your great work! :slight_smile: