Stop rotating camera with HMD in Yaw Rotation axis

I am working in both C++ and blueprint to create a VR experience using the HTC Vive.

In this experience I would like the user to be able to press and hold a button on a motion controller and have that stop the rotation of the camera in the yaw axis. This is so that they can move around in a way similar to this: Cosmic Wandering - for HTC Vive by Punchey

Most of my attempts to halt the camera from moving / rotating in any plane have failed. This was using the “Enable HMD” and “Follow Hmd Orientation” nodes. I have been able to teleport it by teleporting the pawn itself in blueprint.

At this point I am wondering if trying to stop the tracking on the headset was the correct way to go about it, it probably wasn’t.

Unfortunately I have not got the project to hand so I cannot show you what I have got (yet - I intend to update this post tomorrow) but from memory:

  • I have VR pawn which has a capsule collider as its root component then as child components I have a scene component (like VROrigin in the example) with a camera as a child component of that, I also have a MotionController component on the same level as a scene component with a static mesh as a child of that to show the controller, and a C++ script attached to the whole thing which handles my teleportation.

  • In the blueprint for my VR pawn I use the Motion Controller button presses (IsPressed, IsReleased) to find out when a button has been pressed to activate the teleport / cosmic wandering / other interactions.

Any help on any of my issues would be greatly appreciated.

Didn’t realize there was a “reset orientation and position” blueprint node, it was exactly what I was after.

For anyone else wondering how to do it, this is in my VR_Pawn blueprint. The Wanderer Rotation is just a float created in BP and the input manager is unnecessary but I wanted to show all of how it’s done. The white pipe coming into GetLGripDown is the event tick.

121394-cosmic_wandering_1.png

Now the only problem with it is that it’s not blurred so it’s quite sickening to use, I’m going to fix that shortly.

Also, I wasn’t compensating for the offset of the headset within the chaperone, so I fixed that and added blur and now it looks like this:

][3]