docs.unity3d.com
    Show / Hide Table of Contents

    Plane detection

    Plane detection on the Meta OpenXR platform works similarly to other AR platforms, but there are some platform-specific nuances to consider when developing your app. The following sections explain each of these platform-specific cases.

    Room setup

    Plane detection on Meta Quest devices requires that you run Room Setup on your Meta Quest device before any planes can be detected.

    Unlike other AR platforms, Meta OpenXR does not dynamically discover planes at runtime. Instead, the Unity OpenXR: Meta queries the device's Room Setup data and returns all plane components that are stored in its Scene Model. Some entities in the Scene Model, such as Tables or Couches, include planes, while others do not.

    Important

    If Room Setup is not complete, AR Foundation cannot detect any planes. If your app requires planes, you can use scene capture to prompt the user to complete Room Setup.

    Trackable ID

    Unlike other AR platforms, the trackableId property of any ARPlane from the Meta OpenXR platform persists across multiple sessions in the same room setup. This allows you to, for instance, save the trackableId of a user's table to persist a virtual centerpiece on the table each time the user runs your app.

    Plane alignment

    Also unique to the Meta OpenXR platform is the planeAlignmentThreshold property, which determines the threshold for PlaneAlignment categorization. Plane alignment is calculated by taking each component of the plane's normal vector and finding their difference from 0. If the difference is less than the planeAlignmentThreshold, then the MetaOpenXRPlaneSubsystem will categorize the plane depending on which of the normal vector's components are within the threshold. The x and z components are both checked for horizontal planes while the y component is checked for vertical planes.

    Plane classification

    This package maps Meta's native semantic label component to AR Foundation's PlaneClassification. Natively, Meta supports multiple classifications per plane, but ARPlane.classification will only contain the first label, or None if the label cannot be determined.

    Refer to the table below to understand the mapping between Meta's semantic labels and AR Foundation's classifications:

    Meta Label AR Foundation Label
    DESK Table
    COUCH Seat
    FLOOR Floor
    CEILING Ceiling
    WALL_FACE Wall
    DOOR_FRAME Door
    WINDOW_FRAME Window
    SCREEN Other
    LAMP Other
    PLANT Other
    STORAGE Other
    BED Other
    OTHER Other
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023