Move tool, with spatial mapping
The first editing feature we'll add to the project is a tool for moving the picture into place on walls in your room. This will take advantage of the HoloLens spatial mapping capability. Let's add it first, then look at spatial mapping in more detail.
The plan is to enable positioning when the user clicks the Move
button. Clicking again will cancel the Move
command. Specifically, the Move
tool will work like this:
- Pressing the button will activate the
Move
manipulation mode. The button will grow enlarged to show it is activated. - As you move your gaze, the button acts like a handle on the picture object. The picture follows your gaze to move to a new position.
- The tool uses spatial mapping to detect vertical surfaces in your environment, which we'll assume to be a wall (you don't want to hang the picture on the floor or ceiling!).
- Clicking the tool one more time deactivates
Move
mode, restores the icon button to its normal size, and leaves the picture in its new...