Table of Contents

Known issues and limitations of the WeChat Mini Program Mega plugin

This article describes the known issues and limitations of the Mega Mini Program plugin during use.

WeChat known issues

Current confirmed defects in WeChat xr-frame or VisionKit. When they occur, AR functionality fails. Pay attention to the related trigger scenarios during development.

WeChat plane detection exception

In specific cases, such as a large white wall appearing in the image or the camera being blocked for a long time, the plane detection provided by WeChat may enter an abnormal state. In this state, MegaTracker cannot work normally.

For the handling method, see Plane AR tracker exception handling.

Long Session initialization time

AR Session can complete initialization only after WeChat plane detection initialization is complete. In some cases, WeChat plane detection initialization takes a long time.

For why AR Session needs to wait until xr-frame ARTracker initialization is complete, see How MegaTracker works on xr-frame.

<xr-ar-tracker id="xrARTracker" mode="Plane" bind:ar-tracker-state="handleARTrackerState"></xr-ar-tracker>
handleARTrackerState({detail}) {
    if (detail.value.state == xrFrameSystem.EARTrackerState.Detected) {
        console.log('Plane is now detected by XR-Frame ARTracker.');
    }
}

The node's worldPosition is not updated immediately in the current frame

In this example, trs.worldPosition is not updated in time:

public onTick(delta, data) {
    const trs = this.el.getComponent(xrFrameSystem.Transform);
    // 更新前该节点的 WorldPosition
    console.log(`World Position before update: ${trs.worldPosition.x}, ${trs.worldPosition.y}, ${trs.worldPosition.z}`);
    // 更新前该节点的 LocalPosition
    console.log(`Local Position before update: ${trs.Position.x}, ${trs.Position.y}, ${trs.Position.z}`);
    trs.position.x += 0.1;
    trs.position.y += 0.1;
    trs.position.z += 0.1;
    // 该节点的 WorldPosition 未被更新
    console.log(`World Position after update: ${trs.worldPosition.x}, ${trs.worldPosition.y}, ${trs.worldPosition.z}`);
    // 该节点的 LocalPosition 被更新
    console.log(`Local Position after update: ${trs.Position.x}, ${trs.Position.y}, ${trs.Position.z}`);
}

During development, we recommend always using LocalTransform, that is, el.getComponent(xrFrameSystem.Transform).position and el.getComponent(xrFrameSystem.Transform).rotation.

Screen orientation switching exception

If "auto" is set in window in the global configuration app.json of the WeChat Mini Program,

after the device leaves the Mini Program in landscape mode and re-enters in portrait mode, the AR view may become abnormal.

Therefore, do not use "auto" in AR Mini Program applications at any time.

Usage limitations

Hard requirements for feature operation. If they are not met, the feature is unavailable, but this can be avoided by adjusting the configuration or environment.

Device limitations

Devices running the Mega Mini Program plugin must at least support the WeChat VisionKit V1 plane interface. For the best results, we recommend using devices that support the WeChat VisionKit V2 plane interface.

  • Supported device list: see V2 plane AR interface support list.

  • Quick check method:

    1. Scan the official WeChat Mini Program Sample QR code. Official WeChat Mini Program Sample QR code
    2. After entering the Mini Program, navigate to Interface > VisionKit visual capability > Horizontal plane AR-v2 to quickly determine whether the current device is supported.

If you need to use Mega services on devices that do not support VisionKit, see Navigation scene best practices and use the EasyAR Sense AR navigation product, which supports almost all devices.

PlaneMode mandatory configuration

Due to limitations in the support of some WeChat interfaces, planeMode must be set to 1.

<xr-scene ar-system="modes:Plane; planeMode: 1" bind:ready="handleReady">

GPS feature limitations

Aligning Block through GPS is not supported yet.

Placing annotation data through GPS is not supported yet.