Usage¶
Setup Game Mode¶
Before using sample level, make sure you have already installed our plugin following the instructions in Setup section.
Vive Hand Tracking SDK provides ViveHandTrackingGameMode and ViveHandTrackingPawn for your convenience.
These modes supports all the platforms (including SteamVR, Android phones and WaveVR).
You can enable it in ProjectSettings -> Map/Mode Menu.
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.
- Follow official SteamVR tutorials how to setup your camera.
- Follow WaveVR document to setup your project.
Use In Existing Level¶
If you want to use plugin in your existing or new level, just drag HandTrackingProvider actor into the map editor. Remember to replace Editor startup map with your own map.
Please refer to the sample level in the plugin or API Reference for how to start/stop detections and get results. All the required steps are provided in the sample blueprint.
Start/Stop detection¶
StartDetection and StopDetection are provided as blueprint function.
Both requires target as ViveHandTracking Component.
In StartDetection, you can choose the mode you prefer as input. The final mode used is returned by the function.
Get Detection Result¶
When detection is running, detected left and right hand results are available from blueprint function UViveHandTrackingComponent::GetLeftHand() and UViveHandTrackingComponent::GetRightHand().
Each hand contains pre-defined gesture and position of the hand.
Positions has different meanings for each mode selected.
See sample level and FViveHandTrackingResult class for details.
To query current detection mode and status, use blueprint function UViveHandTrackingComponent::GetMode() and UViveHandTrackingComponent::GetStatus().
To query if hand results are updated in this frame, use blueprint function UViveHandTrackingComponent::UpdatedInThisFrame().
Draw Detected Hands As Skeletons¶
Vive Hand Tracking plugin provides a sample blueprint to render hands as skeletons using joints and bones (or only a single joint in 2D/3D mode).
Add BasicHand into your map editor.
You can uncheck Show Left Hand or Show Right Hand if you only want to display one hand as skeleton.
Draw Detected Hands As 3D Model¶
Vive Hand Tracking plugin provides a sample blueprint to render hands as 3D model. This is only supported in skeleton mode.
Add RiggedHand into your map editor.
You can check Hidden in Game for LeftHand or RightHand if you don’t need both hands to display as 3d model.