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¶
Install UnrealVS extension for Visual Studio.
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:
Make sure your project is c++ project. If it’s a blueprint only project, follow Unreal wiki to convert it to c++ project.
Extract
Native Binary for C++ & Unreal Engine.zipinEngine/Source/ThirdPartyfolder inside your Unreal Engine folder. This will createUE_4.20/Engine/Source/ThirdParty/ViveHandTrackingfolder.Extract
Unreal Project Plugin.zipin the root folder of your Unreal project. This will createPlugins/ViveHandTrackingfolder in your Unreal project folder.Rebuild your C++ project files.
- Open
.slnfile in the root folder of your project and set your project as startup project in VS. - Click
Build Startup Projectto build. Unreal Build Tool will detect the plugins and compile them as dependencies to your game. - Press F5 or open
*.uprojectto open Unreal editor for your project.
- Open
Launch your Unreal editor, open
Plugins Editor(Window -> Plugins menu). Enable ViveHandTracking plugin in your Editor.
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.
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.
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.
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.