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.