#Hololens – Simple Gaze tracking using #UrhoSharp


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

El Bruno


Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: