O'Reilly logo

HoloLens Beginner’s Guide by Jason Odom

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Code matters

So, TapToPlace is a freely available script file. I will not go over the entire script; however, I do want to point out some of my modifications.

For one, I added the height buffer. The TapToPlace version of placement does not really allow for vertical adjustments unless you are moving up a wall, and I like to have some height adjustments. Eventually, it would be ideal to add this via a dynamic process; but in this project, we only have the one object being placed.

After the spatial map is set, I do not want to see its mesh appear except when placing the Skeeball machine. So, in the OnInputClicked, I added an additional bool that I wanted a hard set either the DrawVisualMeshes is true or false. Also, at line 110, you can see ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required