Another Friday quick post. In today’s post I’ll share an easy way to enable or disable the Gaze (Hololens mouse style pointer) using UrhoSharp. In the following video (2X speed) we can see how the gaze follows the point of gaze. And I can activate or disable the Gaze tracking with an AirTap gesture.
It interesting of this example, is that you can implement with 10 lines of code. See the code of the class leading. Details important
- In the Start() overrides
- Active the cursor in the line 23
- Active capture gestures of type AirTap on line 22
- I initialize the SpatialMapping, that it is necessary to show the Gaze, lines 25 to 27
- When it detects a gesture of type AirTap, change a flag and enable or disable the cursor. This could be done without the flag, but then use it in a more complete example.
- Routines in lines 37 to 80 are those that are responsible for the SpatialMapping.
The source code for the app is shared in my github account
Greetings @ Toronto