Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Disabling ARPlaneManager causes camera to switch to user facing one

Discussion in 'AR' started by hyposecant, Apr 25, 2022.

  1. hyposecant

    hyposecant

    Joined:
    Oct 8, 2020
    Posts:
    8
    After the user has placed an object I would like to stop planes appearing. I tried disabling the ARPlaneManager by setting enabled to false but it switches the camera to the user facing one. Setting requestedDetectionMode to PlaneDetectionMode.None does the same thing. Is there way to stop this occurring? My ARCameraManager has facing direction set to World.

    ARFoundation 4.2.2
     
  2. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,025
    Starting in AR Foundation 4, the `ConfigurationChooser` automatically chooses the configuration which best supports the requested features of your application. See this video for more information:


    When the camera changes to the front-facing camera, what is the output in the logs of your `ConfigurationChooser`? To find it easily, in a development build you can search your logs for this string: "Using session configuration".
     
    KyryloKuzyk likes this.
  3. hyposecant

    hyposecant

    Joined:
    Oct 8, 2020
    Posts:
    8
    On iOS it was switching from ARWorldTrackingConfiguration to ARFaceTrackingConfiguration. Thanks for the video, using the custom configuration chooser seems to fix it by giving more weight to configurations that have a matching camera. In case others face the same problem, the location in the video on how to do it is here.