As discussed in Chapter 1, Enhancing Reality, spatial mapping is the process of scanning and mapping the physical environment, making it digitally accessible. Having access to the physical environment allows us to create experiences that better integrate with the real world, by creating a greater illusion of realism or utility through understanding the user's context better. In this chapter, we are interested in creating a more immersive experience by merging the virtual and real worlds.
Here, we will learn how to scan and visualize the environment and then use this mapping to place our bin onto a suitable surface, a place where one would expect to find a bin in the real world--on the floor.
Unity provides two ways we can perform spatial mapping; the first uses prebuild components and the second uses the low-level APIs from the UnityEngine...