AR 콘텐츠는 장면에 섞여들도록 올바르게 배치되고 크기가 조정되어야 합니다. 실제 객체와 마찬가지로 더 멀리 있는 가상 객체는 더 작게 표시되어야 합니다. 히트 테스트 (또는 Unity용 AR Foundation의 레이캐스트)를 실행하여 장면에서 3D 객체의 올바른 배치를 확인할 수 있습니다. 올바르게 배치해야 AR 콘텐츠가 적절한 크기로 렌더링됩니다.
히트 테스트는 실제 3D 도형과 원점과 방향으로 구성된 가상 광선 사이의 교차점을 찾습니다. 기기의 카메라를 원점으로 하는 광선이 가장 일반적으로 사용되지만 ARCore에는 세계 공간 좌표에서 임의의 광선을 사용해 Hit Test를 실행하기 위한 API가 포함되어 있습니다.
사용자의 기기 카메라에서 나오는 광선이 바닥, 벽, 물체와 같은 장면의 3D 도형에 도달할 때까지 앞으로 확장된다고 가정해 보겠습니다. 이 경우 조회 결과 또는 감지된 장면 도형이 있는 교차로의 목록이 수신됩니다. 목록은 기기와의 거리를 기준으로 가장 가까운 교차로부터 정렬됩니다. 이는 일반적으로 다른 객체 뒤에 가려진 객체를 볼 수 없으므로 첫 번째 결과가 가장 중요하므로 중요합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2023-12-02(UTC)"],[[["ARCore hit-tests, or raycasts, help you determine the correct placement and scale of virtual objects in the real world by finding intersections between a ray and the scene's geometry."],["Hit results provide distance, pose, and trackable information, allowing you to realistically anchor 3D content."],["There are four hit result types: Depth, Plane, Feature Point, and Instant Placement, each with different use cases and tradeoffs depending on the desired outcome and device capabilities."],["Depth hit results, available on Depth supported devices, utilize depth information for precise object placement on any surface, while Plane hit results are suitable for floors and walls."],["Feature Point hit results rely on visual features, and Instant Placement allows for fast content placement even with initially unknown depth and scale."]]],[]]