Reputation: 659
I have developed an app which is beyond the scale of spatial mapping and therefore I have not included any spatial mapping into my project, but the HoloLens' built in spatial mapping is causing issues, especially in darkened areas. Is there anyway to disable the onboard mapping? Thanks
Upvotes: 3
Views: 1022
Reputation: 659
I received this from DavidKlineMS on forums.hololens.com:
The HoloLens is constantly scanning the environment. In examples like you describe (darkened areas), tracking can be impacted. If you are looking to disable the UI that indicates tracking loss, you will need to handle it manually.
The documentation pages on handling tracking loss (Unity and DirectX) may help you here.
Upvotes: 0
Reputation: 125275
Yes, it can be disabled.
There used to be a function called SetMappingEnabled
. I think that Microsoft removed this function after some update. You could simply call SpatialMappingManager.Instance.SetMappingEnabled(false)
but not anymore.
SpatialMappingManager.Instance.DrawVisualMeshes = false;
should be able to disable Spatial. I would disable Spatial shadow too. Use the function below to disable Spatial.
void disableSpatialMapping()
{
SpatialMappingManager.Instance.StopObserver();
SpatialMappingManager.Instance.CastShadows = false;
SpatialMappingManager.Instance.DrawVisualMeshes = false;
}
Upvotes: 0
Reputation: 747
That capability is not currently available in any of the exposed API's. I would suggest asking the same question in forums.hololens.com and see if you can get the attention of someone from Microsoft as a requested feature.
Upvotes: 2