About 'Creating A VR Pawn Setup'!

In this video (objectives)…

  1. Overview of the desired setup.
  2. Creating the C++.
  3. Hooking up the Blueprint.

After watching (learning outcomes)…

Have an alternative way of setting up VR Pawns.

(Unique Video Reference: 2_LP_VR2)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

Hi Sam, I’m having an issue with this section, as the code works (no errors), the VR does play, and the Right Controller (Oculus Rift controller) is in the scene, but it doesn’t move at all?! I checked my batteries for the controller, all good, and I also ensured it’s working in other games and it does. Do you know what the issue could be? I could send you a git download if you don’t mind. Thanks greatly! I’m trying to figure this out for work.

That’s ok, I figured it out. I’m on version ue4.22 and you’re lesson is ue4.18 there was a VR bug that is occurring with controls that needed a patch to fix. All working now, so all good.

1 Like

Has the fix been issued by Epic now?

I was able to solve the tracking issue with the controller. If you are using UE 4.22 or above you must set the owner on the hand controller like so.

In the VRPawn.cpp add the following just below setting up the RightHandController

void AVRPawn::BeginPlay()
	if(HandControllerClass) {
		RightHandController = GetWorld()->SpawnActor<AHandController>(HandControllerClass);
		RightHandController->AttachToComponent(GetRootComponent(), FAttachmentTransformRules::SnapToTargetIncludingScale);
        ///Set Owner here and it should work

Also … If you are the Oculus Rift or any Oculus platform you may notice that the floor is to close to your head.

You can fix this by opening the VRPawn blueprint and go to your event graph. Off of the begin play node you want to “Set Tracking Origin” and default it to “Floor Level”

1 Like