XR mode does not work on Oculus
Currently, XR mode does not work on Oculus. It appears that the XR code is expecting Google's ARCore if it's an android device (which Oculus is).
https://github.com/BabylonJS/BabylonNative/blob/master/Dependencies/xr/CMakeLists.txt
if (ANDROID)
set(SOURCES ${SOURCES}
"Source/ARCore/XR.cpp") # does not exist for Oculus
elseif (IOS)
set(SOURCES ${SOURCES}
"Source/ARKit/XR.mm")
else()
...
if(WIN32)
set(SOURCES ${SOURCES} "Source/OpenXR/Windows/XrPlatform.h")
else()
message(FATAL_ERROR "OpenXR support not available for platform ${CMAKE_SYSTEM_NAME}")
endif()
...
endif()
It looks like OpenXR needs to be implemented for more than just the Windows platform. I will take a look and see if I can figure out how to make that work, but much of the code in Source/OpenXR is Windows specific. Most likely the Dependency on OpenXR-SDK will need to be OpenXR-SDK-Source as well.
Related: https://github.com/BabylonJS/BabylonNative/issues/231
We haven't tested on Oculus yet. We will likely need to make some changes for this to work.
Bump!