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 another simple use of a Singleton: ApplicationManager.Instance.skeeBallMachinePlacementSet = true; this will turn on the sounds.

After that, we immediately turn the DrawVisualMeshes to false. Those are really all the important changes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.93.210