Unity Virtual Reality Projects
上QQ阅读APP看书,第一时间看更新

Using EditorXR

The user interaction in EXR is similar to Google Tilt Brush. One hand holds your menu palette and the other picks functions from it. Like a boxy glove, you can change menus with the flick of your thumb to rotate menu box faces. That’s the starting point but EXR is ever more complex, as it needs to provide the rich set of Unity Editor features in your virtual workspace, compounded with the need to navigate the scene, organize your editor panels, and of course edit your scene game objects. We encourage you to watch a few demo videos before jumping in.

The hand controller selectors implement an innovative, simultaneous combination of laser pointers for picking distant objects and grabbing (via a selection cone) for objects within reach, as illustrated here:

To manipulate objects, EXR has implemented robust 3D versions of the familiar scene editor widgets in the 2D Editor. They’re really quite powerful and easy to use.

Without going into much further detail, here are the key features in EXR editor:

  • Selection: Robust use of the hand controller thumbpad/stick, buttons, trigger, and grib
  • Menus: Boxed glove menu panels, radial menu, shortcuts, and tools to organize panels in 3D
  • Navigation: Move throughout your scene as you work, fly and blink modes, rotate in place, scale the world, use a mini-world view
  • Workspaces: Correspond to windows in the 2D editor, for Project, Hierarchy, Inspector, Console, Profile, and more, can be opened and placed in the VR work area
  • Other features include locked objects, snapping,

The following diagram shows how the manipulator Gizmo can be used for direct manipulation of the current selected object, in conjunction with the radial menu on your controller, to switch tools:

Perhaps one of the more challenging things to learn in EXR is what each of the hand controls do as they switch meaning depending on the current context. The following diagram shows the controller guides for the VIVE:

Controller guides for the Oculus touch are shown here:

To wrap up this topic, you can even use Google Poly to find objects and insert them into your scene in VR. An example of the third-party extensions of the EditorXR interface and API, the Poly workspace is available in VR. If you have the Poly Toolkit installed (as discussed) and you are using EditorXR, then Poly is one of the available workspaces. Open it to browse and add 3D models from the cloud into your scene, as shown:

To learn more about EditorXR and Google Poly see this debut blog post by Matt Schoen of Unity Labs: https://blogs.unity3d.com/2017/11/30/learn-how-googles-poly-works-with-unity-editorxr/. As a side note, Schoen is a friend and the co-author of another book from Packt, Cardboard VR Projects for Android (2016): https://www.packtpub.com/application-development/cardboard-vr-projects-android.