Skip to content
Snippets Groups Projects
Commit c1866991 authored by Sebastian Pape's avatar Sebastian Pape Committed by Sebastian Pape
Browse files

Altering way of detecting IsHeadMountedMode()

(cherry picked from commit 1ea2dc24)
parent 767f7c7d
No related branches found
No related tags found
2 merge requests!25Altering way of detecting IsHeadMountedMode(),!13Draft: Improve walking implementation
......@@ -13,6 +13,7 @@
#include "Engine/Engine.h"
#include "IXRTrackingSystem.h"
#include "IHeadMountedDisplay.h"
#include "AudioDevice.h"
bool UVirtualRealityUtilities::IsDesktopMode()
{
......@@ -30,7 +31,9 @@ bool UVirtualRealityUtilities::IsRoomMountedMode()
bool UVirtualRealityUtilities::IsHeadMountedMode()
{
return GEngine->XRSystem.IsValid() && GEngine->XRSystem->IsHeadTrackingAllowed();
// In editor builds: checks for EdEngine->IsVRPreviewActive()
// In packaged builds: checks for `-vr` in commandline or bStartInVR in UGeneralProjectSettings
return FAudioDevice::CanUseVRAudioDevice();
}
bool UVirtualRealityUtilities::IsCave()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment