In the previous chapter, we had the user explicitly place the bin. This was achieved by having the bin follow the user's gaze, positioning itself on valid surfaces, and setting its position after detecting an air tap from the user. In this chapter, we will bypass the user completely and place the bin automatically.
To be able to place the bin, at a reasonable location, we first need to better understand the environment. Similar to how we interpret the world through objects rather than pixels, essentially we need a way to express the environment in a more meaningful way than the mesh data we receive from the SurfaceObserver to be able to effectively place the bin procedurally, for example, recognizing a surface as being the floor, where bins normally reside. Luckily, HoloToolkit provides us with the necessary tools to achieve this and we will...