![]() ![]() If you want to follow along with the final Step 4 code, just open that link to see it on GitHub. Open the "ViewController.swift" class by double-clicking it. To quickly go over ARKit's general plane detection capabilities, take a look at our tutorial on horizontal plane detection. Step 4: Place a Grid to Show Detected Horizontal Planes This file will help render a grid for every horizontal plane that ARKit detects. Choose "Import" and add the "overlay_grid.png" file from the unzipped Assets folder. Then, right-click on the left pane of the area in the right side of the project navigator. In the project navigator, click on the "Assets.xcassets" folder. Be sure to do a quick test run before continuing on with the tutorial below. Be sure to give your project a different name, such as NextReality_Tutorial5. If you're not sure how to do this, follow Step 2 in our post on piloting a 3D plane using hitTest to set up your AR project in Xcode. These files will make sure that you don't get lost in this guide, so download the zipped folder containing the assets and unzip it. To make it easier to follow along with this tutorial, I've created a folder with the required 2D assets and Swift file needed for the project. Step 1: Download the Assets You Will Need (See Apple's site to see how the program works before registering for your free Apple Developer account.) That said, you will need a paid Developer account in order to put your app in the App Store. Apple allows you to deploy apps on a test device using an unpaid Apple Developer account. However, it should be noted that you don't need a paid Apple Developer account. Although Swift 3.2 will work on Xcode 9.2, I strongly recommend downloading the latest Xcode to stay up to date. Basically, the iPhone 6 S and up, the iPad Pro (9.7-inch, 10.5-inch, or 12.9-inch first-generation and second-generation), and the 2017 iPad or later. A device with iOS 11+ on an A9 or higher processor.If you haven't already done so, take a look at this past tutorial to learn how to measure the sizes of horizontal planes. In this tutorial, we'll learn how to measure the distance between any two points on a horizontal plane, allowing you to measure anything on a flat surface using an iPad or iPhone by using ARKit. This time around, we'll dive into a slightly different area that touches upon another aspect of measuring in augmented reality. ![]() It was a helpful entryway into the arena of determining spatial relationships with real world spaces versus virtual objects and experiences. In our last ARKit tutorial, we learned how to measure the sizes of horizontal planes. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |