Skip to content

VR Guide

Timothé Rios edited this page Jul 18, 2022 · 8 revisions

User manual

Start

Looking at the palm of one of your hands brings up the menu. Pressing the "connect to API" button connects the application to the API and automatically loads a test room (for the time being). Only the racks of a room are loaded, their children are only loaded if the user wants to display them for performance reasons. After loading the room, no object is selected.

General notions

There are three modes of interaction with the objects of a room: selection, focus and edit (the names are temporary). All objects in a room can be interacted with by touching them with the index finger. However, for performance reasons, only the front and back sides of a rack detect touches. Touching the front(back) face of a rack will update all its direct and indirect children so that their interoperable face is the face on the same side as the front(back) face of the rack. It will be above the touched face that the buttons will be positioned.

Modes description

Select

When an object is touched with the index, the object is selected: it becomes green and half transparent and its children are loaded via the API if necessary and displayed. As soon as an object has been selected, buttons appear at the top left of it. The buttons appear and disappear according to the user's manipulations. It is possible to use a button by touching it with the index finger or by pinching it remotely.

Focus

When an object is focused, it becomes the highest object in the hierarchy and it is not possible to move up with the parent selection button until the object is defocused (by pressing the same button). In this mode it is possible to move children independently by pinching them at a distance and to select them by touching them. Selecting a child will make the father disappear but he will remain the focus object as long as another child is not focused or this one is not defocused.

Edit

When an object is in Edit mode, the children of the object are always displayed but are neither movable nor selectable. It is possible to apply transformations to the focus object according to its nature:

  • If it is a rack, it is possible to move it vertically by pinching it from a distance or by touching it and to rotate it along the vertical axis by pinching the handles located in the middle of the vertical edges from a distance or by touching them.
  • If it is not a rack, it is possible to turn it in any direction by pinching the handles located in the middle of the edges or to change its size by pinching the handles located on the corners.

Buttons description

Edit button

The Edit button appears when the selected object is in focus and switches to Edit mode.

Focus button

The focus button allows to focus on the selected object.

Parent selection button

The parent selection button allows you to select the father of the selected object, except if the latter is a rack. In this case, the rack will simply be deselected.

Reset button

The Reset button resets the positions of the direct children of the selected object as well as its own position. This button cancels all manipulations made in Edit and Focus modes.

Switch button

The switch button is used to change the selectable face of the objects, which is the one that the buttons overlay. It is useful when the object has been rotated 180 degrees in Edit mode.

Developer's guide

Modified scripts for VR

FocusHandler

The focus, selection and edit mode changes are handled in the FocusHandler and are not yet integrated in the PC version.

Events/AllEvent

Added ChangeOrientationEvent, EditModeInEvent and EditModeOutEvent.

Added scripts for XR and VR

All the scripts added for VR are in the XR and XR/VR folders.

XR

ButtonManager

Manages the positioning and the behavior of the buttons, contains the functions called when a button is clicked.

HandInteractionHandler

Is made to handle all actions resulting from touching an object, only selecting exists for the moment. Handles the selection of objects when they are touched as well as the assignment of the interactable face in the case of a rack.

ScaleBehaviour

Resets the size of the hand menu to its initial value when it is recalled in front of the user.

VR

APIMenuHandler

Child class of GridMenuHandler, handles the menu for loading objects via the API.

GestureHandler

Not used, attempt to detect the end of a movement (does not work for the moment).

RackRotationHandler

In Edit mode, detects if a rack is grabbed and stops it from rotating as long as he stays grabbed.

RoomTpMenuHandler

Child class of GridMenuHandler, handles the menu for teleporting to loaded rooms.

Tutorial

Allows you to create a tutorial via the editor.

TutorialEditor

Manages the custom display of Tutorial.cs.

VR prefabs

All prefabs and non-script VR objects are stored in Assets/MixedRealityToolkit.Generated, Prefabs/XR and Prefabs/XR/VR.