วางวัตถุทันที
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คู่มือเฉพาะแพลตฟอร์ม
Instant Placement API ช่วยให้ผู้ใช้วางวัตถุ AR ได้ทันทีโดยไม่ต้องย้ายอุปกรณ์ก่อนเพื่อให้ ARCore ทำการติดตามและตรวจหาเรขาคณิตของพื้นผิวอย่างเต็มรูปแบบ
หลังจากผู้ใช้วางวัตถุแล้ว ระบบจะปรับแต่งท่าทางของวัตถุแบบเรียลไทม์ขณะที่ผู้ใช้เดินไปรอบๆ สภาพแวดล้อม เมื่อ ARCore ระบุท่าทางที่ถูกต้องในบริเวณที่มีการวางวัตถุ AR แล้ว ระบบจะอัปเดตท่าทางและวิธีการติดตามของวัตถุ
ในตัวอย่างต่อไปนี้ ระบบจะวางวัตถุโดยใช้ท่าทางโดยประมาณในตอนแรก ซึ่งระบุด้วยสีระดับสีเทา เมื่อระบบระบุท่าทางที่ถูกต้องได้แล้ว วัตถุจะเปลี่ยนเป็นสี ซึ่งบ่งบอกว่าระบบใช้ท่าทางที่ถูกต้อง การเปลี่ยนแปลงท่าทางอย่างฉับพลันจะส่งผลต่อ "ขนาด" หรือสเกลที่รับรู้ของวัตถุด้วย

ในรูปที่ 1 ตำแหน่งโฆษณาทันทีปิดอยู่และไม่ได้กําหนดเรขาคณิตของพื้นผิว
วัตถุที่วางอยู่บนพื้นทางด้านขวาของโต๊ะพูล (จุดสีน้ำเงินเล็กๆ 4 จุด) ดูเหมือนจะล้มคว่ำ การวางวัตถุไม่ชัดเจน
ในรูปภาพ 2 การเปิดใช้ตำแหน่งโฆษณาทันทีทำได้จากเมนูใต้ไอคอนรูปเฟือง
ในรูปภาพ 3 เมื่อเปิดใช้การวางทันที ระบบจะวางวัตถุใหม่ในฉาก
รูปภาพจะปรากฏเป็นโทนสีเทาแทนที่จะเป็นภาพสี เพื่อบ่งบอกว่ายังไม่ได้แก้ไขท่าทางให้ถูกต้อง
ในรูปที่ 4 วัตถุใหม่จะมีสีและท่าทางถูกต้องเมื่อตรวจพบเรขาคณิตของพื้นผิว (ที่อธิบายโดยเส้นตารางติดตามได้)
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 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."]]