- Microsoft HoloLens Developer's Guide
- Dennis Vroegop
- 470字
- 2025-04-04 18:50:03
Gestures
Basically, we have two gestures, or three if you count variations on the air-tap. These gestures can be used to instruct the device to do something. Combined with the possibility of placing the cursor on objects by moving your head, we have ways to interact with objects.
First, we have the bloom gesture. As I have explained earlier, this is used to show the main start screen or hide that screen. This gesture is captured by the system and is not really available to us as developers. Compare this gesture with the use of the Windows key on a keyboard; this also generates a system-level command we cannot really use in our applications.
That leaves us with the air-tap. Officially, this is accomplished by having your finger move like a barrier. I have noted that it also works if you do a pinch movement, as if you want to grab an object out of the air.
There are two variations of this:
- Tap: Move the finger down and then immediately up again.
- Hold: Move the finger down, keep it there, and then move your hand about. This one is used to zoom, drag, and rotate items in the holographic space around us.
The device will recognize these special movements, and we can take advantage of this. In the later chapters, I will explain exactly how this works internally, but for now it is enough to know that we have these two modes.
To see this in action, start up the Hologram app that comes preinstalled with your device. We use the air-tap to start the app, to place the selection screen somewhere, and to select a hologram. Then, you move the hologram to a place you want it to be by moving your head; air-tap to place it:

This is all done with the standard air-tap gesture we have used so many times earlier. However, there is more we can do. If you do half a tap, thus move your finger down and keep it there, you will see a circle of dots appear around the object. Now, if you move your hand slightly to the right or left, you will see the object rotate. Move your finger back up to set it to this position.
We use the same method to enlarge and move it; choose Adjust from the menu below the hologram and perform the same gesture--finger down, move it about, and then release by moving your finger up again.
We can design our app in such a way that we can move the cursor this way, but I really want you to think that through--users are not used to this. They expect to move their heads to move the cursor, and we should stick to that.