BabylonNative icon indicating copy to clipboard operation
BabylonNative copied to clipboard

XR mode does not work on Oculus

Open bdbelevate opened this issue 4 years ago • 2 comments

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.

bdbelevate avatar Mar 05 '21 15:03 bdbelevate

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.

bghgary avatar Mar 05 '21 18:03 bghgary

Bump!

yuripourre avatar Mar 21 '24 22:03 yuripourre