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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access