Looking at things is pretty nice, showing the cursor when the user looks at something they can use even better. However, the system would be quite useless if we could not command the app to do something with objects. We need to use gestures.
The HoloLens currently only supports one gesture. It recognizes the tap gesture. In chapter 6, Take a Look Around You, we will delve into this more and use the different gestures to move our instruments across the stage, but we need to set things up here to delay some groundwork.
Take a look at our GazeSampleDirectX project and the main class GazeSampleDirectXMain
. In here, you will find the spatialInputHandler
field of the SpatialInputHandler
type. This class is part of the template and thus not a part of the framework. Open this file and take a look at it:
public class SpatialInputHandler { private SpatialInteractionManager interactionManager; private SpatialInteractionSourceState sourceState; public SpatialInputHandler...