x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Bug][4.11] IsHeadMountedDisplayEnabled always returns true in editor mode

Hello,

As of 4.11.1 the Blueprint function IsHeadMountedDisplayEnabled is apparently broken. According to the documentation:

Returns whether or not we are currently using the head mounted display.

Yet when playing in editor viewport, it returns true even in non VR mode. In standalone mode I don't reproduce the problem.

A similar bug was already reported last year in version 4.9:

https://answers.unrealengine.com/questions/272771/49-p1-isheadmounteddisplayenabled-always-reporting.html https://forums.oculus.com/community/discussion/25640/ue-4-9-headset-detection-unreliable

Needless to say, IsHeadMountedDisplayEnabled is quite on the critical side of the spectrum when it comes to VR development...

Product Version: UE 4.11
Tags:
more ▼

asked Apr 13 '16 at 03:58 AM in Bug Reports

avatar image

Julien Guertault
23 1 6 9

avatar image Rudy Q ♦♦ STAFF Apr 13 '16 at 07:44 PM

Hello Julien Guertault,

I was not able to reproduce this issue on our end. I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?

  2. If so, could you provide detailed list of steps to reproduce this issue on our end?

  3. Was the project that is being tested upgraded form an older version of the engine?

avatar image Julien Guertault Apr 14 '16 at 06:24 AM

Hi Rudy,

The problem seems to be a little more tricky than my original description suggests. I created a minimal repro case to demonstrate it.

My setup is UE 4.11.1 on a Windows 7 64b. I have the Oculus 1.3 installed, but never completed the setup because my tracking device is not recognized. This means I cannot try VR applications at the moment (all I would see is the Oculus setup scene). I don't know if this could be the reason the API calls return wrong values.

To reproduce the bug I followed the following steps:

  1. Create a new empty project in UE 4.11.1, with all default options.

  2. Edit the level Blueprint and add a function on the Event tick, so it prints a string (A) if IsPlayerControllerFollowHmdEnabled returns true, and another string (B) if IsHeadMountedDisplayEnabled returns true.

  3. Play in "Selected viewport".

Level Blueprint

This is the behavior I observe:

  • No matter what, string A is always displayed.

  • At first string B is not displayed.

  • If I go to Editor Preferences > Level Editor > Play and check Viewport Gets HMDControl, then string B is displayed when playing in the viewport.

According to their documentation (tooltip in the Blueprint editor, and comment in IOculusLibraryPlugin.h and HeadMountedDisplayFunctionLibrary.h):

  • IsPlayerControllerFollowHmdEnabled: "Returns true if PlayerController follows HMD orientation/position. False, otherwise."

  • IsHeadMountedDisplayEnabled: "Returns whether or not we are currently using the head mounted display."

Given those descriptions, I would expect in my tests IsHeadMountedDisplayEnabled to always return false (at no point did I render the scene on the HMD), and IsPlayerControllerFollowHmdEnabled to either always return false, or at most return true when Viewport Gets HMDControl is checked.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

After looking into this issue further. I believe that this is working as intended. If you set the Viewport Gets HMDControl to true, this will return false if the head set is turned off and it will return true if the head set is turned on. These were the results of the test after following your instructions above. I believe this to be the intended functionality of this setting because when the head set is on and the Viewport Gets HMDControl is set to true I am able to move the camera with the head set. This shows that the HMD is enabled and being used. I hope that this information helps.

Make it a great day

more ▼

answered Apr 15 '16 at 05:18 PM

avatar image

Rudy Q ♦♦ STAFF
49.4k 543 128 516

avatar image Julien Guertault Apr 19 '16 at 06:09 AM

I must have misunderstood the intent then. Thanks for the answer.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question