Raykea
大綱
Introduction
In this part of the course, you’ll build an app similar to one made by everyone’s favorite Swedish semi-disposable furniture store.
Two Worlds
A look at the “two worlds” theory of the real and virtual world, as well as the important concept of AR anchors.



Basic Plane Detection
In this episode, you’ll configure the app to detect horizontal and vertical planar surfaces in the real world, and get it to tell you where they are.
建立configuration

取回平面的anchor資料
Plane Detection Theory
It often helps to understand the theory behind how something works. Let’s take a look at how ARKit detects horizontal planes (relatively easy) and vertical ones (a little trickier).





Drawing AR Planes Over Detected Surfaces
Now that we now how to detect real-world planes, let’s draw AR planes over them. We’ll draw a grid that says “place furniture here” over detected horizontal surfaces, and a poster of Ray over detected vertical surfaces.
Back to the Two Worlds
We return to the “two worlds” theory to talk about the fact that as an AR session goes on, ARKit learns more about the real world, and updates its virtual world to match.
Changes to a Previously Detected Surface
Now that you know that ARKit revises its internal map of the world as it learns more about it, you’ll take advantage of that learning to revise the planes you draw in AR space.
Hit Tests
In Raykea, the user taps on the “place furniture here” grid on the screen, and that tap specifies where the furniture goes. But how do we translate those taps into a 3-dimensional location for the virtual furniture? With hit tests.

Looking at a Detected Surface
Let’s use hit tests to see if a detected horizontal surface is onscreen at the moment.
Finishing Raykea
Putting it all together, you'll take everything we’ve covered and finish building the app.
Conclusion
Congratulations — you’ve written a scaled-down version of one of the most popular AR apps! Let's review where you are and see what comes next.
Last updated