Hi folks,
I am using the XR Rig provided by Magic Leap in Unity, and I want to set the camera’s near clipping plane to 0.1 meters programmatically. However, every time I change this value, it gets reset to the default minimum of 0.37 meters when I build and run the app on Magic Leap 2.
From the Magic Leap 2 Clipping Plane documentation, I understand the following:
-
Magic Leap 2 enforces a minimum near clipping plane distance for comfort reasons.
-
By default, this minimum is 0.37 meters (37 cm), but users can adjust it in device settings down to 0.25 meters (25 cm).
-
Applications can either respect the user-set near clipping plane or enforce the default minimum.
-
If the camera’s near clip plane is set below the enforced minimum, it will be overridden to the enforced value at runtime.
-
The near clip policy (whether to respect user settings or enforce the default) can only be changed inside the Unity editor before building the app, via the Magic Leap Support feature settings in OpenXR.
-
Changing the near clip policy or device settings requires restarting the app to take effect.
Given these constraints:
-
Is there any way to programmatically set the near clipping plane to 0.1 meters on Magic Leap 2?
-
Or is the enforced minimum clipping plane (0.25 m user-adjustable, 0.37 m default) a hard limit that cannot be overridden programmatically?
Any guidance or best practices on handling near clipping plane settings with Magic Leap 2 would be appreciated.
Best Regards,
Sandy