开始使用 Meta Quest 3
简介
本主题介绍如何使用 Meta™Quest 和 OpenXR 的操作指南。在 Meta Quest 上部署应用程序有两种方式:一种是 "低浸入式 "应用程序,即应用程序包含在头显默认 VR 环境的一个窗口中;另一种是 "高浸入式 "VR 应用程序,即应用程序接管整个 VR 环境的渲染。
注: 本说明主要针对 Quest 3,但许多步骤也适用于使用 OpenXR 的其他基于 Android 的头显。
前提条件
您需要 Qt 6.8 或更高版本和Qt Quick 3D Xr 模块才能开始使用。Qt Quick 3D Xr 模块是QtQuick3D 的一部分,将与 一起安装。您还需要安装和配置 Android NDK、SDK 和 JDK。有关为 Android 开发设置Qt Creator 的更多信息,请访问Getting Started with Qt XML forAndroid。
设置 Quest
您需要在设备上启用开发者模式,以便将应用程序部署到 Meta Quest。下载 Meta Quest Developer Hub,以便从设备上传输视频流、启用无线调试等。
部署低浸入式应用程序
部署低浸入式应用程序的步骤与开发和部署Android 版 Qt 的步骤相同。您已经可以通过这种方式将 Qt 示例部署到 Quest,无需进行任何修改。
将 XR 应用程序部署到 Meta Quest 所需的项目更改
为 Quest 准备 XR 应用程序需要一些额外步骤,因为QtQuick3D QML 中的应用程序入口点略有不同。在普通的QtQuick3D 应用程序中,进入 3D 场景的视图是通过View3D 类型,但在 XR 应用程序中,视图是通过XrView 类型。此外,还有 APIs in Qt Quick 3D Xr例如,手部跟踪、空间锚点和穿透。
AndroidManifest.xml 文件也需要修改,以包含目标设备 OEM 指定的必要权限和功能。关于 Quest,请参见以下内容:
<meta-data android:name="com.oculus.intent.category.VR" android:value="vr_only"/>
<uses-permission android:name="com.oculus.permission.HAND_TRACKING" /> <uses-feature android:name="oculus.software.hand-tracking" android:required="false" />
更多信息,请参阅Meta 的 Manifest 文档。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.