Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 1.65 KB

SpatialProcessingSurfaceMagnetism.md

File metadata and controls

24 lines (14 loc) · 1.65 KB

Spatial Processing + Solver Surface Magnetism example

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.

Demo Video

https://gfycat.com/PitifulRareKodiakbear

Scene

SpatialProcessingSurfaceMagnetism.unity

How to use

You need to assign same Unity layer to the Spatial mapping’s plane and Solver Surface Magnetism’s Magnetic Surface.

  1. 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.

  2. In SpatialMapping prefab, make sure the Physics Layer is set to 31.

  3. Assign SolverSurfaceMagnetism script to an object. In Magnetic Surface option, select the SpatialMapping layer.

  4. After initial room scanning, you will be able to see MRTK logo plane smoothly snaps to the surfaces.