Table of Contents

Best practices for navigation scenarios

In navigation scenarios, providing a smooth and accurate user experience is crucial. EasyAR Mega offers various xDoF modes to accommodate different device capabilities and environmental requirements. Understanding the differences between these modes and selecting the appropriate one based on platform characteristics is key to building an excellent navigation application.

Choose the right tracking mode

Based on Mega positioning, we can select different tracking modes to enhance the navigation experience according to the sensor capabilities provided by the device and application requirements.

For phones equipped with ARKit or ARCore, you only need to use the default 6DoF tracking mode combined with Mega spatial positioning to achieve stable and smooth continuous path navigation, providing the best user navigation experience.

However, for mid-to-low-end devices where ARKit or ARCore support is unclear or for the widest user base, choosing the appropriate xDoF mode is crucial. Different xDoF working modes will directly affect the tracking performance of the device.

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

  • Inertial navigation / 5DoF mode

    • Description: It utilizes the device's sensors and EasyAR's built-in inertial navigation algorithm to achieve 5DoF tracking, providing stable and smooth continuous path navigation to a certain extent.
    • Behavior: When the user walks, virtual path indicators (such as arrows on the ground) will remain stably attached to the ground. Even if the user briefly shakes or changes orientation, the indicators will not jump significantly. However, if there is a change in height (e.g., going up or down stairs), the virtual content will no longer adhere and will float in the air or below the ground.
    • Requirements: The device must have high-quality gyroscope and accelerometer sensors.
    • Applicable scenarios: Most indoor and outdoor navigation scenarios, serving as the preferred fallback option when 6DoF is unavailable.
  • 3DoF mode

    • Description: When the device lacks an accelerometer but has a gyroscope, it can fall back to 3DoF mode.
    • Behavior: In 3DoF mode, navigation indicators will rotate according to the device's orientation (pitch, yaw, roll), but when the user translates (moves forward, backward, or sideways), the position of the indicators in space will not update. It will function like a compass, always pointing in the correct direction but not following the user's steps on the map.
    • Requirements: The device must at least have a gyroscope.
    • Applicable scenarios: Serves as a fallback option when 5DoF is unavailable. Suitable for simple directional guidance but not for complex navigation requiring precise path following.
  • 0DoF mode

    • Description: This is the most basic mode, suitable for almost all devices, but offers the most limited user experience.
    • Behavior: In 0DoF mode, the device cannot perceive any movement or rotation of itself. Navigation indicators are fixed at a certain position on the screen (e.g., an arrow in the center of the screen), only indicating the relative direction of the target (e.g., the target is to your left front).
    • Requirements: No special sensor requirements.
    • Applicable scenarios: Serves as the final fallback option or for simple "direction-finding" functionality, similar to a compass in traditional navigation.

Experience comparison summary:

Tracking mode Behavior during user movement User experience Recommendation
6DoF Virtual path stably follows the user's various movements in real space Best, immersive and precise ⭐⭐⭐⭐⭐
5DoF (Inertial navigation) Virtual path stably follows the user's movement but fails when height changes Second best, preferred fallback when 6DoF is unavailable ⭐⭐⭐⭐
3DoF Path indicators rotate with device orientation but do not follow user movement Average, can indicate direction but lacks spatial following ⭐⭐⭐
0DoF Indicators are fixed on the screen, only showing the target's direction Basic, provides only directional information

Special notes for the WeChat MiniProgram platform

Important note: The Mega WeChat MiniProgram Plugin on the WeChat MiniProgram platform does not yet fully support 5DoF (inertial navigation), 3DoF, or 0DoF functionality.

In WeChat MiniPrograms, the current stage primarily supports the 6DoF mode for navigation experiences.

  • Current behavior: When users launch Mega-based navigation in a MiniProgram, if the device itself does not support 6DoF mode, the ARSession will fail to start and report an error in the console.
  • Development recommendation: When planning navigation features on the WeChat MiniProgram platform, design with 6DoF mode as the prerequisite. Refer to the WeChat official documentation for the list of supported devices, or use our API to check device compatibility.
const easyarPlugin: easyar.EasyARWechatMiniprogramPlugin = requirePlugin("easyar-wechat-miniprogram") as easyar.EasyARWechatMiniprogramPlugin;  

if (easyarPlugin.isMegaTrackerSupported() === false) {  
    const message = `The current device does not support VK v1 and v2. Please refer to the WeChat official documentation: https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/visionkit/plane.html`;  
    wx.showModal({  
        title: "Device not supported",  
        content: message,  
        showCancel: false,  
    });  
    console.error(message);  
}  

Alternatives to the WeChat Mini Program Platform

For developers who need to implement a navigation application with full device support in WeChat Mini Programs, we highly recommend using our Sight+ AR Navigation product directly.

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

  • Ready-to-use: No complex Mega SDK integration required; quick access through simple API calls.
  • Wide compatibility: Broadly compatible with various terminal devices, supporting almost all devices from 0DoF to 6DoF.
  • Complete functionality: Supports advanced navigation features such as full path planning, off-route correction, turn prompts, and digital guide assistance.
  • Comprehensive support: Comes with practical backends and tools, including information management, road network deployment, POI adjustment, and routing services.
  • Optimized experience: Deeply optimized for the performance and interaction characteristics of WeChat Mini Programs to ensure a smooth user experience.

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

Best practices summary

  • When developing Apps on Android/iOS devices or 6DoF-supported head-mounted displays, prioritize using Mega + 6DoF mode for the best navigation experience. Based on the actual device capabilities, downgrade to 5DoF, 3DoF, or 0DoF to maximize device compatibility.
  • On the WeChat Mini Program platform, currently only devices with 6DoF mode are supported, or you can directly integrate Vision+ AR Navigation to achieve full device support and rich product features.