Hololens Re-scanning the environment using spatial understanding

274 Views Asked by At

I'm using spatial understanding to scan the environment and generate the spatial meshes. (According to the example in the HoloToolkit spatial understanding example)

After generating the meshes initially, i want to have an option to re-scan the environment again(removing the old meshes and regenerating new meshes). Is there any possible ways where i can achieve this. Any help would be much appreciated.

2

There are 2 best solutions below

0
On

You should be able to restart spatial understanding, a place you could start is by deleting the meshes (they are all parented in a gameobject) and deleting the spatialunderstanding components then programmatically recreating them and configuring them.

0
On

if you use voice commands from mixedrealitytoolkit-unity (holotookit-unity) you can bind the scanning to a voice command (for example "scan") every time you call scan it should start scanning.

I'm not sure how to delete old meshes completely. but I don't see a point in deleting them. If the environment updated it will delete unnecessary meshes automatically. Im sure there is a command to delete all meshes somewhere in toolkit though. I recommend to check github for that.