Moving holograms using gaze and gesture
I've been trying to move holograms using gaze and gesture:
- airtap object
- gaze to move object
- airtap again to place object
I followed the instructions posted earlier on but still could not get it to move.
By @HoloSheep :
After you have correctly copied the HoloToolkit into a new unity project and made all of the appropriate HoloLens project setting adjustments you would then do the following to get the gaze and gesture manager scripts working:
•add empty game object to root of your scene hierarchy (name it ModelBase)
•add 3D model (like a cube) as child of ModelBase
•add 3D box collider as component of ModelBase
•size 3D box collider to slightly larger than 3D model (in all dimensions) be sure to include the models origin inside 3D box collider area
•add Cursor prefab from HTK to root of your scene hierarchy
•add another empty game object to root of your screen hierarchy (name it Managers)
•add GazeManager script from HTK as component of Managers
•add GestureManager script from HTK as component of Managers
•add SpatialMapping prefab from HTK to root of hierarchy (turn off Draw Visual Meshes checkbox)
•add TapToPlace script as component to ModelBase
Build and deploy.
You should be able to gaze at your 3D object and Airtap on it to engage the spatial mapping and move the object around. The next Airtap should place your object where you were gazing at (on the spatial mapped surface) and the spatial mapping should turn off.
I've also made all appropriate setting adjustments.
Appreciate if anyone could help.