MRTK ML Camera - Near Clipping Plane

Unable to set custom near clipping plane.
Something is overwriting the camera near clipping plane on update.
I searched for everything that references the cameras clipping plane - no luck
In previous versions if I would change:
private static readonly float MINIMUM_NEAR_CLIP_METERS of magicLeapCamera and it worked...
The MRTK camera profile doesn't do anything, were not working before.

Unity Editor version:
ML2 OS version:

  • Magic Leap OS - 1.1.0-dev1 [B3E.221020.13-R.039]
    MLSDK version:
  • MRTK - 1.0.0-v1
    Host OS: (Windows/MacOS)

Error messages from logs (syntax-highlighting is supported via Markdown):

1 Like

Thank you for your post @istvan. I'm looking into this now and will report back asap.

1 Like

I noticed that the release note for the XR plugin 7.0.0-pre.1 said that this is being enforced.

Bummer, I couldn't figure out how to trick it into letting me use the clip plane that I want. Makes me want to revert to 7.0.0-exp.6 but not sure how to do that

1 Like

Hi @istvan, In our November release, we updated our Unity Magic Leap XR Plugin dependency to 7.0.0-pre.1. Unity also added enforcement that the camera's near clipping plane will be at least the amount specified by MagicLeap Graphics API, which by default is 0.37m. Please see our Comfort and Content Placement guide for more information. If your near clipping plane is set lower than the default, you will experience issues.

Please let me know if I understood your question correctly and if the above helps.

1 Like

@javier This is expected to be a temporary regression. It's a bug. We'll have a fix to bring it back in a future release.

1 Like

" This can be mitigated by showing a projection of the content onto the near clipping plane whenever content does go behind the clipping plane. " - Comfort and Content Placement .

I would love to see a sample scene of how you've envisioned this to work.

1 Like


This is expected to be a temporary regression. It's a bug. We'll have a fix to bring it back in a future release

Are you saying that the near clipping plane in XR plugin 7.0.0-pre.1 is a bug with 0.37m forced setting support?

Or do you mean that the ability to change the 0.37cm near clipping plane is a bug?

In the first place, does Magic Leap want to be able to change the 0.37m near clipping plane? Or do you want Magic Leap to not be able to change the 0.37m near clipping plane?

We are changing the near clip minimum enforcement logic in a future release. Currently targeting January. Developers have been able to change the near clipping behavior in the past due to a bug in the one of the packages. In the future, the minimum clipping plane enforcement will recommended and not mandatory.


Is this feature public yet, I can change the setting in Unity editor by commenting out lines in the MagicLeapML.cs script. If I build the clipping seems to revert back. Has the update been released yet? Thanks

1 Like

The clipping plane requirement will be fixed in a future version of the com.unity.xr.magicleap package. Keep an eye out for for the update in the package manager.