Table of Contents

Best practices for navigation scenarios

In navigation scenarios, providing a smooth and accurate user experience is crucial. EasyAR Mega provides multiple xDoF modes to adapt to different device capabilities and environmental requirements. Understanding the differences between these modes and choosing according to platform characteristics is key to building an excellent navigation application.

Choose the correct tracking mode

Based on Mega localization, you can choose different tracking modes according to the sensor capabilities provided by the device and the requirements of the application to improve the navigation experience.

For phones with ARKit or ARCore, you only need to use the default 6DoF tracking mode. Combined with Mega spatial localization, it can provide stable, smooth continuous route navigation and the best user navigation experience.

However, for mid-range and low-end models where ARKit or ARCore support is unclear, or for the broadest user base, choosing the right xDoF mode is critical. Different xDoF working modes directly affect tracking performance on the terminal device.

For these models, you need to test and select their working modes in the following order of priority:

  • Inertial navigation / 5DoF mode

    • Description: It uses device sensors and the built-in EasyAR inertial navigation algorithm to implement 5DoF tracking, providing stable and smooth continuous route navigation to some extent.
    • Behavior: When the user walks, virtual route indicators, such as arrows on the ground, stay stably attached to the ground. Even if the user briefly shakes the device or changes direction, the indicator will not jump significantly. However, when there is climbing or descending in height, such as going up or down stairs, the virtual content will no longer stay attached and will instead float in the air or appear below the ground.
    • Requirements: The device needs high-quality gyroscopes and accelerometers.
    • Applicable scenarios: Most indoor and outdoor navigation scenarios, as the preferred fallback when 6DoF is unavailable.
  • 3DoF mode

    • Description: When the device does not have an accelerometer but has a gyroscope, it can fall back to 3DoF mode.
    • Behavior: In 3DoF mode, the navigation indicator rotates according to the device orientation (pitch, yaw, and roll), but when the user translates (moves forward, backward, or sideways), the indicator's position in space is not updated. It always points in the correct direction like a compass, but does not move on the map with the user's footsteps.
    • Requirements: The device needs at least a gyroscope.
    • Applicable scenarios: A fallback when even 5DoF is unavailable. It can be used for simple direction guidance, but is not suitable for complex navigation that requires precise route following.
  • 0DoF mode

    • Description: This is the most basic mode and works on almost all devices, but the user experience is also the most limited.
    • Behavior: In 0DoF mode, the device cannot sense any movement or rotation of itself. The navigation indicator is fixed at a position on the screen, such as an arrow in the center of the screen, and only indicates the relative direction of the target, such as the target being in front-left of you.
    • Requirements: No special sensor requirements.
    • Applicable scenarios: The final fallback, or for simple "find the direction" features, similar to a compass in traditional navigation.

Experience comparison summary:

Tracking mode Behavior when the user moves User experience Recommendation
6DoF The virtual route stably follows all kinds of user movement in real space Best, immersive and accurate ⭐⭐⭐⭐⭐
5DoF (inertial navigation) The virtual route stably follows the user's movement, but fails when height changes Second best, preferred fallback when 6DoF fails ⭐⭐⭐⭐
3DoF The route indicator rotates with device orientation but does not follow user movement Average, can indicate direction but lacks a sense of spatial following ⭐⭐⭐
0DoF The indicator is fixed on the screen and only shows the target direction Basic, only provides direction information

Special notes for the WeChat Mini Program platform

Important: The Mega WeChat MiniProgram Plugin on the WeChat Mini Program platform has not yet fully released support for 5DoF (inertial navigation), 3DoF, and 0DoF features.

In WeChat Mini Program, the current stage mainly supports the 6DoF mode navigation experience.

  • Current behavior: After a user starts Mega-based navigation in a Mini Program, if the running device itself does not support 6DoF mode, ARSession fails to start and reports an error on the terminal.
  • Development recommendation: When planning navigation features on WeChat Mini Program, design on the premise of 6DoF mode. Check the official WeChat documentation for the device support list, or check whether the device is supported through our API call.
const easyarPlugin: easyar.EasyARWechatMiniprogramPlugin = requirePlugin("easyar-wechat-miniprogram") as easyar.EasyARWechatMiniprogramPlugin;

if (easyarPlugin.isMegaTrackerSupported() === false) {
    const message = `当前设备不支持 VK v1 和 v2,请参考微信官方文档:https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/visionkit/plane.html`;
    wx.showModal({
        title: "设备不支持",
        content: message,
        showCancel: false,
    });
    console.error(message);
}

Alternative solution for the WeChat Mini Program platform

For developers who need to build navigation applications with complete device support in WeChat Mini Program, we strongly recommend using our SightPlus AR Navigation product directly.

This navigation product is a solution optimized specifically for the Mini Program ecosystem and has the following advantages:

  • Ready to use: No complex Mega SDK integration is required. You can quickly integrate it through simple API calls.
  • Broad compatibility: Broadly compatible with many terminal devices, supporting almost all devices from 0DoF to 6DoF.
  • Complete features: Supports advanced navigation features such as complete route planning, yaw correction, turn prompts, and digital human guidance.
  • Complete supporting tools: Provides complete supporting backends and tools for information management, road network deployment, POI adjustment, route calculation services, and more.
  • Optimized experience: Deeply optimized for the performance and interaction characteristics of WeChat Mini Program to ensure a smooth user experience.

How to start?
Visit the AR Navigation official page to learn how to quickly integrate and use our navigation product to build your Mini Program application.

Best practice summary

  • When developing apps on Android/iOS devices or on headset devices that support 6DoF, prioritize Mega + 6DoF mode to get the best navigation experience. According to the actual running device, fall back to 5DoF, 3DoF, and 0DoF to maximize broad device compatibility.
  • On the WeChat Mini Program platform, the current stage only supports running on devices in 6DoF mode, or directly integrating SightPlus AR Navigation to achieve complete device support and rich product features.