GetHMDWornState stops working when used to toggle stereo rendering

Neomi
Wed, 07 Sep 2016 12:34:58 +0000
XR Development

Build type: Binary from the Unreal Launcher

Build version: 4.13.0 - 3106830

Detailed description of the issue: I tried to replicate the new editor feature “VR Mode Auto-Entry” by using GEngine->HMDDevice->GetHMDWornState() in a custom actor. It works once when putting the HMD on and taking it off, then it stops working if it is used to toggle stereo rendering. Disabling stereo rendering seems to break the worn state.

Repro Steps:

1. Create a new blank C++ project called “HmdTest”, no starter content.

2. Save the untitled level and set it as a start up level in the project settings.

3. Add “HeadMountedDisplay” to the dependencies in the build script.

4. Add a new C++ class called “HmdWornTestActor” derived from StaticMeshActor.

5. Implement the class as shown in the attachment “HmdWornTestActor_Source.zip” (HmdWornTestActor.cpp and .h).

6. Add a new material called “IndicatorMtl”, add a vector parameter called “Color”, set it to white and wire it to the base color input.

7. Add a blueprint class called “HmdWornIndicatorActor” derived from this C++ class. In its StaticMeshComponent, set the actor to being mobile, set the mesh to a cube and its material to the new IndicatorMtl.

8. Implement the event graph of the actor as shown in “HmdWornIndicatorActor_BP_JustIndicate.jpg” (see attachments).

9. Place an instance of the actor in the level so that it can be seen from the player start.

10. Package the project and run it on a machine with an attached Oculus Rift CV1. Test with a thumb on the CV1 worn sensor to see how the mesh changes color accordingly.

11. Alter the event graph as shown in “HmdWornIndicatorActor_BP_ToggleHmd.jpg” (see attachments).

12. Package the project again and test on the same machine. Entering VR mode by putting the headset on works once, exiting VR mode by taking it off works once as well, then it stops working. VR mode will not toggle a second time and the indicator mesh stays red as well.

With this I can reproduce the problem 100% of the time on my test machine (no second Rift capable machine available for testing). You can find the completed project files (zipped from within the editor) in the attachments.

System Specs: Windows 7 Ultimate x64, Intel Core i7 4930K, 32 GB RAM, AMD Radeon R290X, Oculus Rift CV1 (version 1.7.0 runtime installed).

Attachments:
[HmdWornTestActor_Source.zip (.cpp and .h for the C++ actor)][1]

[HmdTest.zip (project files)][4]

12 posts - 9 participants