即时放置对象
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
平台专用指南
借助 Instant Placement API,用户无需先移动设备以允许 ARCore 建立完整跟踪并检测表面几何图形,即可立即放置 AR 对象。
用户放置物体后,系统会随着用户在环境中移动而实时优化物体的姿势。当 ARCore 能够在放置 AR 对象的区域确定正确的姿势后,便会更新对象的姿势和跟踪方法。
在以下示例中,系统最初使用估计的姿势放置物体,该姿势由灰度颜色表示。确定准确的姿势后,对象会变为彩色,表示它使用的是准确的姿势。姿势的突然变化也会影响物体的外观“尺寸”或感知尺度。

在图 1 中,即时展示位置已停用,并且 Surface 几何图形未定义。放置在桌球桌右侧地板上的物体(四个蓝色小圆点)看起来像是被推倒了,其姿势未定义。
在图 2 中,通过齿轮图标下的菜单启用了即时展示位置。
在图 3 中,启用“即时放置”后,系统会在场景中放置一个新对象。它以灰度(而非彩色)显示,表示尚未校正为准确的姿势。
在图 4 中,当检测到表面几何图形(由可跟踪网格线描述)时,新对象会变为彩色,并且其姿势准确无误。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThis page provides developer guides for instant placement in AR experiences using various platforms like Android, Unity, and Unreal Engine.\u003c/p\u003e\n"],["\u003cp\u003eInstant Placement allows users to place AR objects immediately without waiting for full tracking, enhancing the user experience.\u003c/p\u003e\n"],["\u003cp\u003eInitially placed objects have an estimated pose, which is later refined for accuracy as ARCore gathers more environmental data.\u003c/p\u003e\n"],["\u003cp\u003eVisual cues, such as grayscale, indicate when an object's pose is estimated and transitions to color when the pose becomes accurate.\u003c/p\u003e\n"],["\u003cp\u003eThe provided figures illustrate the difference between instant placement enabled and disabled, showcasing the pose refinement process.\u003c/p\u003e\n"]]],[],null,["# Place objects instantly\n\n**Platform-specific guides** \n\n### Android (Kotlin/Java)\n\n- [Instant placement developer guide for Android (Java)](/ar/develop/java/instant-placement/developer-guide)\n\n### Android NDK (C)\n\n- [Instant placement developer guide for Android NDK](/ar/develop/c/instant-placement/developer-guide)\n\n### Unity (AR Foundation)\n\n- [Instant placemnt developer guide for Unity (AR Foundation)](/ar/develop/unity-arf/instant-placement/developer-guide)\n\n### Unreal Engine\n\n- [ARCore SDK for Unreal Engine (official documentation)](https://docs.unrealengine.com/5.0/en-US/developing-for-arcore-in-unreal-engine/)\n\nThe Instant Placement API allows the user to place AR objects instantly, without\nhaving to first move their device to allow ARCore to establish full tracking and\ndetect surface geometry.\n\nAfter the user has placed an object, its pose is refined in real time as the\nuser moves through the environment. Once ARCore is able to determine the correct\npose in the region where the AR object has been placed, it updates the object's\npose and tracking method.\n\nIn the following example, an object is initially placed using an estimated pose,\nwhich is indicated by its grayscale color. Once an accurate pose can be determined,\nthe object becomes colored, indicating that it is using an accurate pose. The\nsudden change in pose also affects the apparent \"size\" or perceived scale of the\nobject.\n\nIn Figure 1, Instant Placement is disabled and surface geometry is undefined.\nObjects placed on the floor to the right of the pool table (four small blue dots)\nappear knocked-over, their poses are undefined.\n\nIn Figure 2, Instant Placement is enabled from the menu under the gear icon.\n\nIn Figure 3, with Instant Placement enabled, a new object is placed in the scene.\nIt appears in grayscale, instead of colored, to denote that it has not been\ncorrected for an accurate pose yet.\n\nIn Figure 4, the new object becomes colored, and its pose is accurate, when the\nsurface geometry (described by the *trackable* grid lines) is detected."]]