This example shows how to make objects smoothly align with the physical surface. For more information about Spatial Processing and Solver system, please read these README files.
https://gfycat.com/PitifulRareKodiakbear
SpatialProcessingSurfaceMagnetism.unity
You need to assign same Unity layer to the Spatial mapping’s plane and Solver Surface Magnetism’s Magnetic Surface.
-
Add a new layer for the planes created by Spatial Processing. Mixed Reality Toolkit's Apply Mixed Reality Projcet Settings automatically addes a new layer 31:Spatial Mapping.
-
In SpatialMapping prefab, make sure the Physics Layer is set to 31.
-
Assign SolverSurfaceMagnetism script to an object. In Magnetic Surface option, select the SpatialMapping layer.
-
After initial room scanning, you will be able to see MRTK logo plane smoothly snaps to the surfaces.