Setup

Note

This section assumes you know the hardware requirements and features of the Vive Hand Tracking SDK. Please read Vive Hand Tracking SDK Overview section before this section.

  • If you have installed older version of Vive Hand Tracking SDK, please completely remove the files first.
  • Minimum supported Unreal version is 4.21.
    • WaveVR may need newer Unreal version. If you plan to use WaveVR with Vive Hand Tracking SDK, use Unreal version required by WaveVR.
    • If you are using ARCore support in Vive Hand Tracking SDK, minimum supported Unreal version is 4.22. ARCore sample needs an extra package named Unreal Plugin ARCore.zip.
    • Plugin is tested on all versions from 4.21 to 4.26 for all platforms.
    • Unreal 4.22 have dll dynamic loading bug that prevents running Hand Tracking SDK inside development Unreal Editor. Debug Unreal Editor or built binaries are not affected.

Samples are included in the plugin. Please refer to the Using Samples Levels sections for details after you completed setup of your project.

Setup Visual Studio

  1. Install UnrealVS extension for Visual Studio.

    ../_images/extension.png
  2. Follow Unreal document to setup UnrealVS extension.

Unpack Plugin

Vive Hand Tracking SDK provides an Unreal plugin as one zip file: Unreal Project Plugin.zip. This contains levels, blueprints, build sciprts, native binaries and etc.

Follow the steps below to install the plugin in your project:

  1. Make sure your project is c++ project. If it’s a blueprint only project, follow Unreal wiki to convert it to c++ project.
  2. Extract Unreal Plugin.zip in the root folder of your Unreal project. This will create Plugins/ViveHandTracking folder in your Unreal project folder.
  3. Optional (for ARCore only): Extract Unreal Plugin ARCore.zip in the root folder of your Unreal project. This will create Plugins/ViveHandTracking/Content/Blueprints/ARCore folder in your Unreal project folder.
  4. Right click .uproject file, then click generate visual studio project files to update C++ solution.
  5. Rebuild your C++ project files.
    1. Open .sln file in the root folder of your project and set your project as startup project in VS.
    2. Click Build Startup Project to build. Unreal Build Tool will detect the plugins and compile them as dependencies to your game.
    3. Press F5 or open *.uproject to open Unreal editor for your project.

Setup Game Mode

Before using sample level, make sure you have already installed plugin following the instructions in Setup section.

Vive Hand Tracking SDK provides ViveHandTrackingGameMode and ViveHandTrackingPawn for your convenience. You can set it in ProjectSettings -> Map/Mode Menu.

../_images/modes.png

The provided mode and pawn supports all the platforms (including SteamVR, Android phones) with expection of WaveVR. Use WaveVR_Pawn from WaveVR plugin if you are running on WaveVR platform.

../_images/wavevr_pawn.png

For ARCore, you should Set Default Pawn Class to Default Pawn or use other pawns(not process event related to VR) in Project Settings.

Game modes and pawns from SteamVR and WaveVR work perfectly with Vive Hand Tracking SDK. This is useful if you only work on single platform, or needs to customize your game mode and spawn.

Based on different platform, process of setup may be different. Please refer to the sections below to setup each platform you use.

After the setup is complete, please refer to Basic Usage section for how to use the plugin with sample level or your existing level.

Windows

Note

SteamVR disables camera by default. This means a fresh installed SteamVR cannot use Vive Hand Tracking SDK without manual setup. See Camera Setup for how to setup SteamVR and check camera availability before using Vive Hand Tracking SDK.

  • SteamVR plugin must be enabled.

    ../_images/steamvr.png
  • The library DLL requires Microsoft Visual C++ Runtime 2015 Update 3.

  • Hand detection is paused when HMD is took off. Please put on your HMD before using hand tracking.

  • Follow the steps in Camera Setup with SteamVR (Vive, Vive Pro or Valve Index) or Vive Console (Vive Cosmos) before start application.

WaveVR (Vive Focus)

  • You need to enable WaveVR plugin.

    • If you are using Vive Focus/Focus Plus, supported WaveVR version is 3.0.2 to 3.2.0.
    • If you are using Vive Focus 3, supported WaveVR version is 4.0 or newer.
    • See WaveVR Compatibility for details.
    • WaveVR may require newer version (than 4.21) of Unreal Engine, use the one required by WaveVR.
    ../_images/wavevr.png
  • In order to add module dependencies for WaveVR, you need set useWaveVR to true and useGoogleARCore to false.

    Plugins/ViveHandTracking/Source/ViveHandTracking/ViveHandTracking.Build.cs
     9
    10
    11
    12
    13
    // Build with GoogleARCore plugin, default is false.
    bool useGoogleARCore = false;
    // Build with WaveVR plugin, default is true.
    // If the project is built for Android Phone, set it to false.
    bool useWaveVR = true;
    

Note

useWaveVR should, and only should, be true when WaveVR plugin is enabled.

  • Camera permission declaration and request are handled in the plugin using Unreal API.

  • Both ARMv7 and ARMv8 binaries are provided in Vive Hand Tracking SDK. The binaries are selected by Unreal based on the architecture you select during package.

    • WaveVR 3.1.1 or later is required for ARMv8 support.
  • In Project Settings -> Rendering tab, uncheck Mobile Multi-view.

    ../_images/mobile_multiview.png

Google ARCore

  • The native library is tested on Pixel.

  • Make sure your device support arcore. Follow ARCore supported devices to check whether your device is in supported device list or not.

  • Google Play Services for AR is necessary for running ARCore apps on your device. The latest version of Google Play Services for AR can be downloaded from Google Play Store or other application markets.

  • Enable Google ARCore plugin. Meanwhile, all virtual reality plugins which are enabled by default must be set as disabled.

    ../_images/google_arcore.png
  • In order to add module dependencies for ARCore, you need set useWaveVR to false and useGoogleARCore to true.

    Plugins/ViveHandTracking/Source/ViveHandTracking/ViveHandTracking.Build.cs
     9
    10
    11
    12
    13
     // Build with GoogleARCore plugin, default is false.
     bool useGoogleARCore = false;
     // Build with WaveVR plugin, default is true.
     // If the project is built for Android Phone, set it to false.
     bool useWaveVR = true;
    

Note

useGoogleARCore should, and only should, be true when GoogleARCore plugin is enabled.

  • Follow Enable ARCore to set configuration in Project Settings.

  • App orientation should be set to Full Sensor in Project Settings -> Android tab.

    ../_images/orientation1.png

Android Phones

  • The native library is tested on Pixel.

  • Camera permission declaration and request are handled in the plugin using Unreal API.

  • Both ARMv7 and ARMv8 binaries are provided in Vive Hand Tracking SDK. The binaries are selected by Unreal based on the architecture you select during package.

  • The app must be in landscape orientation.

  • Change useWaveVR from true to false to set module dependencies for android phone.

    Plugins/ViveHandTracking/Source/ViveHandTracking/ViveHandTracking.Build.cs
     9
    10
    11
    12
    13
    // Build with GoogleARCore plugin, default is false.
    bool useGoogleARCore = false;
    // Build with WaveVR plugin, default is true.
    // If the project is built for Android Phone, set it to false.
    bool useWaveVR = true;