I'm trying to get the closest point on the spatial mesh obtained from MS Hololens. I could get the SpatialAwarenessMeshObject collider and gameObject easily with this reference (https://learn.microsoft.com/en-us/windows/mixed-reality/mrtk-unity/features/spatial-awareness/usage-guide?view=mrtkunity-2021-01)
It is running but not what I expected. The calculated closest point is not correct. Did I do it right? And please let me know differences between OnObservationAdded and OnObservationUpdated method.
enter image description here LineManager.cs script : I want to draw a line from a certain point to the closest point on the spatial mesh. This script tries to get the Collider of the SpatialAwarenessMeshObject and find the closest point on it.
enter image description here MeshManager.cs : This script implements the virtual method from the SpatialAwarenessHandler. I don't really know about what each virtual methods means.
Thanks.