Đặt đối tượng ngay lập tức
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Hướng dẫn dành riêng cho nền tảng
API Đặt tức thì cho phép người dùng đặt các đối tượng AR tức thì mà không cần phải di chuyển thiết bị trước để cho phép ARCore thiết lập tính năng theo dõi đầy đủ và phát hiện hình học bề mặt.
Sau khi người dùng đặt một đối tượng, tư thế của đối tượng đó sẽ được tinh chỉnh theo thời gian thực khi người dùng di chuyển trong môi trường. Sau khi ARCore có thể xác định đúng tư thế trong khu vực đặt đối tượng AR, ARCore sẽ cập nhật tư thế và phương thức theo dõi của đối tượng.
Trong ví dụ sau, ban đầu, đối tượng được đặt bằng tư thế ước tính, được biểu thị bằng màu thang màu xám. Sau khi xác định được tư thế chính xác, đối tượng sẽ được tô màu, cho biết đối tượng đó đang sử dụng tư thế chính xác. Việc thay đổi tư thế đột ngột cũng ảnh hưởng đến "kích thước" rõ ràng hoặc tỷ lệ nhận biết của đối tượng.

Trong Hình 1, tính năng Đặt tức thì bị tắt và hình học bề mặt không được xác định.
Các đối tượng được đặt trên sàn ở bên phải bàn bi-a (bốn dấu chấm màu xanh dương nhỏ) có vẻ như bị đổ, tư thế của các đối tượng này không được xác định.
Trong Hình 2, bạn có thể bật tính năng Vị trí tức thì trong trình đơn bên dưới biểu tượng bánh răng.
Trong Hình 3, khi bật tính năng Đặt ngay, một đối tượng mới sẽ được đặt trong cảnh.
Hình ảnh này xuất hiện ở thang màu xám thay vì màu để cho biết rằng hình ảnh chưa được chỉnh sửa để có tư thế chính xác.
Trong Hình 4, đối tượng mới sẽ có màu và tư thế chính xác khi phát hiện được hình học bề mặt (được mô tả bằng các đường lưới có thể theo dõi).
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\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."]]