Training Stream - Sam and Wes' VR Stream: Cameras, Multiplayer, Tips and Tricks! - Live from Epic HQ

WHAT
This week is a grab bag of VR Tips and tricks, with special guest , Epic Games’ newest Developer Relations Support Engineer. Sam and Wes will be looking at the VR Camera Refactor, VR Multiplayer, and, time permitting, VR Audio. While Tom will talk about his experience with VR, the Tips and Tricks he wrote for his blog, and the changes he needed to make the the Unreal Engine templates to make them VR Ready.

Part 3

WHEN
Tuesday, Feb 9th @ 2:00PM-3:00PM ET - Countdown

WHERE

WHO

Feel free to ask any questions on the topic in the thread below, and remember, while we try to give attention to all inquiries, it’s not always possible to answer’s questions as they come up. This is especially true for off-topic requests, as it’s rather likely that we don’t have the appropriate person around to answer. Thanks for understanding!

Archive:

[QUESTION] Is there a special setup for multiplayer with motion controlled games? In my 1v1 game I run into a problem where 1 player will control the hands of both players in a match. Is there a way to allocate each motion controller and it’s movement to its parent player? Sam talked about this same bug in the beginning of the last VR stream.

Also is it possible to test a multiplayer vr game on a single pc with 1 oculus and one set of hydra controllers?

Hey ,

You have run into the same hurdle we have regarding multiplayer with motion controllers. Our team has indicated that a code side fix for this is in the 4.11 preview build however after testing, I’m still unable to get this to work properly myself. I’ve reached out to the developers working on this and I’m still in the process of identifying the best approach (this may not be ready for next weeks stream). We are going to do a quick setup for a teleport mechanic with motion controllers (similar to what is used in Bullet Train) if we do not have the multiplayer motion controller issue sorted out before then.

-W

Edit: Here is the fix and the relevant code:


bool UMotionControllerComponent::PollControllerState(FVector& Position, FRotator& Orientation)
{
	if (IsInGameThread())
	{
		// Cache state from the game thread for use on the render thread
		const APlayerController* Actor = Cast<APlayerController>(GetOwner());
		bHasAuthority = !Actor || Actor->IsLocalPlayerController();
	}

bHasAuthority must be true for one motion controller and false for the remote, however I haven’t found the best way to define this yet since I’m doing it in Blueprint.

I’m also just using blueprints for my game.

So if bHasAuthority has to be set to true for local player and false otherwise do you think if I have a 1player bp and a 2player bp then assign each player to player1 or 2 on load (kinda like couch knights) and then have the authority set true and false for each instance that could work?

I gave this a shot but wasn’t able to provide authority to the motion controllers just the BP that owned them and couldn’t get it to work. I’m still digging for answers from our team here and hope to have a solution soon.

[question] What’s about Android/Cardboard and Google Tango integration?

[question] when demoing the profiler, the sample game was going over 11.11 ms. Don’t you need to be under that to not miss a frame to headset?

Going off of this: SteamVR/Frame Timing - Valve Developer Community

[question] Would love to know if GearVR to GearVR multiplayer is planned to be working in 4.11 ( https://answers.unrealengine.com/questions/341008/android-as-host-not-working.html )

[question] I would like to create stereoscopic photospheres. A simple photosphere in the game level is nice but I would like to know how to display a different photoshere for each eye.
Thank you!

[question] Will be an “out of the box ad-hoc” solution for loading screens in VR (non blocking head tracking while loading between maps), Thanks.

(of course I know the current solution of using streaming, I dont like it, it seems made for large terrains… it’s overkill for small VR maps)

[question] Is there an easy way to add collision to the head of the player? In 4.10 I’ve been trying to add a simple sphere collision and parent it to the camera but that would only set the collision to the camera position but would scale its transform when leaning. Is this fixed in the camera re-factoring in 4.11?

[question] Could I use tom’s VR first person template to setup my character and implement the motion controller fix for multiplayer but then only use blueprints after initial setup?

I have not tried exactly what you are talking about while testing this feature but the camera refactor should help with this. Please let us know if this is not helping or working for you.

Am I right in assuming the motion controller code fix goes inside the MotionController .cpp or .h??

Thanks after seeing the collisions that you added to the player head in the beginning of the stream I think the camera refactor solves this issue. Got to get home and try it out.

Hi Wes,

were you able to find out how to fix the Multiplayer Motion Controller thing?
I am also in dire need of that solution…

Cheers

Hi Fredrum,

I haven’t had a to investigate this further yet on the Blueprint side. I will try to get an answer on this, this week if possible. A lot of the team is gearing up for GDC among other things here at the office so they are a little preoccupied at the moment. I’ll see what I can find out though.

-W

Wes if I redo my character BP into c++ will let this issue be fixed on a 4.11 build?

I built the VR teleport demo and for the most part is working good except half the directions I point my gun in the bullet will stick in the air without moving while the other 180 degrees the gun shoots normally. I can still teleport to the sphere in both cases. At first I thought it might be something in the character that it was hitting but by moving the gun to different locations and rotating it the bullet will stick in areas I can also shoot through just based on which way the gun is pointed. The 180 that sticks is the xy quadrants 3, 4. Pointing the gun in the -x.
Thanks,

Hey :slight_smile:
So where do i insert this Code ?