WVR_EnableAutoPassthrough

WVR_EXPORT void WVR_EnableAutoPassthrough(bool enable)

Function to show the passthrough overlay when a player passes through the virtual wall.

Use this function to also decide whether the passthrough overlay should be shown or not when a player passes through the virtual wall. This function must be called after calling WVR_RenderInit().

Version
API Level 5
Note
Supported from Runtime version 5 or higher (certain devices only). Make sure the target device supports passthrough overlay by calling WVR_GetSupportedFeatures() and checking WVR_SupportedFeature_PassthroughOverlay.
Parameters
  • Enable: or disable the passthrough overlay when a player passes through the virtual wall.

How to use

The following example will disable the passthrough overlay when a user passes through the virtual wall:

#include <wvr/wvr_arena.h>

void disableAutoPassThrough() {
    uint64_t support = WVR_GetSupportedFeatures();
    if (support & WVR_SupportedFeature_PassthroughOverlay) {
        WVR_EnableAutoPassthrough(false);
    }
}

void main() {
    WVR_RenderError pError = WVR_RenderInit(&param);
    disableAutoPassThrough();
}