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"

The OculusInput plugin breaks SteamVR when UE4 is launced with hmd=SteamVR

When using the Rift with UE4 and trying to select SteamVR instead of libOVR from the commandline (by passing hmd=SteamVR on the commandline), the OculusInput plugin will make a call to:

         ovrResult initStatus = ovr_Initialize(&initParams);

With a different minor version number than SteamVR itself uses. The symptom is then that the HMD tracks and renders to the mirror view, but nothing shows up inside the headset except an error message that UE4 is unresponsive.

A fix is to add this to FOculusInput::FOculusInput( const TSharedRef& InMessageHandler ) just before the call to ovr_Initialize:

     // Check whether the commandline explicitly doesn't want oculus
     FString ExplicitHMDName;
     bool bUseExplicitHMDName = FParse::Value(FCommandLine::Get(), TEXT("hmd="), ExplicitHMDName);
     if ((bUseExplicitHMDName && (!ExplicitHMDName.Equals(FString(TEXT("OculusRift")), ESearchCase::IgnoreCase))) ||
         (FParse::Param(FCommandLine::Get(), TEXT("nohmd"))))
     {
         UE_LOG(LogOcInput, Log, TEXT("Aborting OculusInput initialization because nohmd or a different hmd was set on the command line."),
             TEXT(OVR_FILE_DESCRIPTION_STRING), TEXT(OVR_VERSION_STRING));
         return;
     }

In the above fix I also added a check for "nohmd" to do the same early return. The touch controllers can't be tracked without the HMD, but at some point they did start letting you use them untracked just for the joystick, etc., so you may want to leave that bit out if you run into this issue and need that functionality.

The goal here was to select SteamVR from the commandline for use with the Oculus Rift. The only way I got it to work before was to disable the rift plugins entirely, but I still wanted them to be selectable from the commandline too.

Product Version: UE 4.16
Tags:
more ▼

asked Sep 17 '17 at 01:43 AM in Bug Reports

avatar image

muchcharles
209 4 7 19

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

0 answers: sort voted first
Be the first one to answer this question
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