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.

Sample level is included in the plugin. Please refer to Plugins/ViveHandTracking/Content/ViveHandTrackingMap.umap for sample map.

  • If you have installed older version of Vive Hand Tracking SDK, please completely remove the files first.
  • Minimum supported Unreal version is 4.20.
    • WaveVR may need newer Unreal version. If you plan to use WaveVR with Vive Hand Tracking SDK, use Unreal version required by WaveVR.
    • Plugin is tested on 4.20, 4.21, 4.22 and 4.23 for all platforms.
    • Unreal 4.22 have dll dynamic loading bug that prevents running Hand Tracking SDK inside Unreal Editor. Built binaries are not affected.

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 two zip files: Unreal Project Plugin.zip and Native Binary for C++ & Unreal Engine.zip. The first zip contains Unreal plugin (levels, blueprints, build sciprts and etc.) in project folder, the second zip contains native binaries in Unreal engine folder.

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 Native Binary for C++ & Unreal Engine.zip in Engine/Source/ThirdParty folder inside your Unreal Engine folder. This will create UE_4.20/Engine/Source/ThirdParty/ViveHandTracking folder.

  3. Extract Unreal Project Plugin.zip in the root folder of your Unreal project. This will create Plugins/ViveHandTracking folder in your Unreal project folder.

  4. 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.
  5. Launch your Unreal editor, open Plugins Editor (Window -> Plugins menu). Enable ViveHandTracking plugin in your Editor.

    ../_images/plugin.png
  6. Restart your Unreal editor to take effect.

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 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

  • Make sure to test camera frame rate in SteamVR settings before start application.

WaveVR (Vive Focus)

  • You need to enable WaveVR plugin.

    • WaveVR may require newer version (than 4.20) of Unreal Engine, use the one required by WaveVR.
    ../_images/wavevr.png
  • 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.

  • See Selecting Android Binary section for selecting binaries (default is WaveVR).

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 left orientation.
  • See Selecting Android Binary section for selecting binaries (default is WaveVR).

Selecting Android Binary

Vive Hand Tracking SDK provides different binaries on Android for Android phones and WaveVR platform. This is due to using different APIs to get camera frames, which requires different native libraries.

By default, Vive Hand Tracking SDK selects WaveVR platform for your build. If you need to build for Android phones or need to switch between two platforms, please follow the instructions below.

The platform selection is controlled by the Plugins/ViveHandTracking/Source/ViveHandTracking/ViveHandTracking.Build.cs script as highlighted below. Change useWVR from true to false selects Android phone platform.

Plugins/ViveHandTracking/Source/ViveHandTracking/ViveHandTracking.Build.cs
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
else if (Target.Platform == UnrealTargetPlatform.Android)
{
    bool useWVR = true;
    if (useWVR)
    {
        AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(ModuleDirectory, "ViveHandTracking_WVR_UPL.xml"));
        PublicAdditionalLibraries.Add(ThirdPartyPath + "/libs/WaveVR/armeabi-v7a/libaristo_interface.so");
        PublicAdditionalLibraries.Add(ThirdPartyPath + "/libs/WaveVR/arm64-v8a/libaristo_interface.so");
    }
    else
    {
        AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(ModuleDirectory, "ViveHandTracking_UPL.xml"));
        PublicAdditionalLibraries.Add(ThirdPartyPath+"/libs/Android/armeabi-v7a/libaristo_interface.so");
        PublicAdditionalLibraries.Add(ThirdPartyPath + "/libs/Android/arm64-v8a/libaristo_interface.so");
    }
}

Note

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