Skip to main content
Version: 21 Aug 2024

System Settings

Users can adjust the Display Zone near boundary, also called the near clipping plane, on Magic Leap 2 devices. The near boundary protects users from experiencing discomfort caused by content rendered too close. See Display Zone overview for more details.

Starting in OS 1.4.0, the near boundary can be set between the default 0.37m to as close as 0.25m.

The Display Zone near boundary on the device is set by the user. When the user sets the Display Zone near boundary, it is set across every app on the device, and remains set at that distance until the user changes it again.

We recommend that you design your app so that it can accommodate various user-defined boundaries. This will result in the smoothest user experience. If that isn't possible, we provide guidance on how you can request that the user change the setting on the device. For more information, see Designing your app to accommodate user-defined Display Zone near boundaries.

In the sections below, we provide you with best practices to create apps that adjust to user-defined boundaries.

Safety and comfort considerations

The default Display Zone near boundary in the Magic Leap 2 operating system (OS) is set to 0.37m because it is safe and comfortable for the majority of people. Viewing content on the Magic Leap 2 device at distances closer than 0.37m may increase the likelihood of user discomfort, such as eye strain, blurred vision, headache, eye fatigue, double vision, dizziness, and nausea.

caution

You are solely responsible for determining an appropriate Display Zone near boundary for your application and its intended use case. You are also responsible for the health and safety of your applications, and for including appropriate warnings regarding health and safety to your end users. Distances below 0.37m should be used only when absolutely necessary and in limited use cases only.

When you create apps for Magic Leap 2 devices, we recommend you follow these guidelines:

  • For maximum comfort, the default Display Zone near boundary for the Magic Leap 2 OS is set at 0.37m. We recommend setting the Display Zone near boundary in your application at this default distance – or the distance set by the user – to reduce the likelihood of any user discomfort associated with viewing content at close distance and to ensure a consistent user experience between the OS and applications. Setting the Display Zone near boundary closer than 0.37m may result in an increased likelihood of user discomfort such as eye strain, blurred vision, headache, eye fatigue, double vision, dizziness, and nausea.

  • If a user sets their device to have a Display Zone near boundary closer than the default (0.37m), your applications should adjust to that setting, request that the user change the setting on their device, or notify the user that the application will not be adjusted to the user setting.

Setting the boundary using the device’s settings menu

Users can set the Display Zone near boundary by taking the following steps on the device:

  1. Open the Settings app on the Magic Leap 2 device and select Display.
  2. Scroll down and select Advanced.
    The Display setting menu with Advanced highlighted.
  3. Scroll down and select Display Zone.
    The advanced Display setting menu with Display Zone highlighted.
  4. In the Display Zone page, use the slider to set the Display Zone near boundary.
    The Display Zone page with the Near Boundary slider highlighted.
  5. If you choose a Display Zone near boundary less than 0.37m, you’ll be prompted with a page warning you about potential discomfort associated with a closer near boundary.
    • If you don’t want to see this warning if you set your Display Zone near boundary again, select the checkbox for Don’t ask me again.
    • Click Yes, continue.
      Display Zone near boundary warning page.

Designing your app to accommodate user-defined Display Zone near boundaries

Because the Display Zone near boundary is user-set, you might not always know what that boundary is for the device on which your app is running. Individual user preferences vary, so your app might run on devices that are set to different boundaries.

We recommend that you design your app to use the Display Zone near boundary specified in the OS by the user, so that you can provide the most users possible with the experience they are expecting and minimize the likelihood of discomfort.

If that isn't possible, you can request that the user change their Display Zone near boundary setting to the near boundary required for your app.

If you can't complete either of the options above, notify the user that your app won't use their Display Zone near boundary setting. In this message, we recommend including your Display Zone near boundary setting and explaining that the user won't see content any closer than that distance while using your app.

Any time a Display Zone near boundary of less than 0.37m is in use, we recommend that you use notifications and prompts to inform the user about the potential discomfort a closer near boundary can cause.

Adjusting your app's Display Zone near boundary

To adjust your app's Display Zone near boundary to the user-designated setting on the Magic Leap 2 device, read the Display Zone near boundary setting from the OS.

For apps that use OpenXR, use the OpenXR extension XR_EXT_view_configuration_depth_range. XR_EXT_view_configuration_depth_range reports static values that only get updated when a new OpenXR instance starts. The user’s Display Zone near boundary won’t change until the user closes and restarts your app.

An additional OpenXR extension, XR_ML_view_configuration_depth_range_change, has not yet been approved for the OpenXR Specification and is considered experimental. XR_ML_view_configuration_depth_range_change reads the device's Display Zone near boundary setting while the app is running.

For Unity apps that use MLSDK instead of OpenXR, use the Unity API AndroidJavaClass with the value ReadOnly.

Requesting that the user change their Display Zone near boundary

To request that users change their Display Zone near boundary, use the Magic Leap-specific Android intent android.settings.display.CLIPPING_PLANE_SETTING. (For more information about using Android intents with Magic Leap 2, see Intents.)

In your app, create a dialog box that informs the user that your app wants them to change their Display Zone near boundary, advises them about potential discomfort caused by a near boundary closer than 0.37m, and prompts the user to accept or decline the change.

For example, the dialog box you create might look like this:

Example of an app prompting the user to change their Display Zone near boundary setting.

In this example, android.settings.display.CLIPPING_PLANE_SETTING takes the user to the Display Zone page in Settings when the user selects the Yes button.

The Display Zone page with the Near Boundary slider highlighted.

On the Display Zone page, the slider shows the near boundary that your app requests. The user can accept the requested distance or use the slider to select a different distance. If the distance is less than 0.37m, the user sees the warning screen, like they do when they access the Display Zone page from the start of Settings.