Comment on page
NRSDK’s Hand Tracking capability tracks the position of key points of your hands and recognizes hand poses in real-time. Hand poses are shown in the first-person view and used to interact with virtual objects immersively in-world.
- The NRSDK can track hands through the world coordinate frame and annotated the position and orientation of twenty-three key points；
- The NRSDK currently supports six hand poses from either hand;
- While tracking hand poses, the NRSDK also returns to a state of whether there are hands being tracked;
- Left/Right hand detection is available in NRSDK;
- When using hands as input, the hand’s pose drives a laser cursor-pointer that behaves like the standard controller cursor.
- As long as the index finger and thumb pinch together (regardless of the pose of other fingers), it is considered a pinch pose.
- Gestures above will all be recognized as pinch/select.
- Keep this gesture for 1.2s to evoke the home menu.
- Both left and right hands will be recognized.
Similar to a controller, NRSDK provides a pointer for each hand to interact with targets. The pointer pose and whether the pointer pose is being tracked can be obtained from
HandStateof each hand.
The pointer pose must meet the following conditions to be correctly tracked:
- The hand is recognized
- The palm direction is pointing forward
A basic hand pointer style is included in
NRHand_Lprefabs located in
Assets>NRSDK>Prefabs>Hands. You can also customize the style of Hand Pointer based on the pointer pose and related data, combined with some data in NRPointerRaycaster.
The NRSDK hand tracking system identifies the position of 23 key points on the hand for every recognized hand pose(position and orientation).
Hand Tracking has been fully tested on the following Android phones:
- XREAL Dev-Kit
- OnePlus：9R / 7T / 8T / 8 Pro 5G
- LG：V60 / V50S ThinQ 5G / V50 ThinQ 5G / G9 (Velvet 5G) / Wing
- SONY：Xperia 5 II / Xperia 1
- SAMSUNG：Galaxy Note20 5G / Galaxy S10+ / Galaxy S20+ 5G / Galaxy Z Fold 2 5G / Galaxy S21 5G / Galaxy Note20 Ultra / Galaxy Note10+ 5G / Galaxy A90 5G
- OPPO: Find X2 / Find x2 Pro / Find x3 Pro
- ZTE Axon 10 pro
- Black Shark 2 Pro
Backgrounds & Camera
- Hand tracking SDK uses on-board camera(s) to detect hands, so make sure hands are visible from the camera.
- Avoid complicated backgrounds, solid backgrounds are preferred;
- Avoid backlight or low light, or unbalanced lighting conditions in camera frame；
- Avoid stacked or interlaced fingers for either hand；
- Avoid the hands of different people;
- Avoid fast-moving;
- There are chances that the orientations of the joints are recognized converted. If so, please move your hands out of the visible fields and move them back again.
Sample Use Case:
//returns true if input source switch to hand tracking success
bool switchToHandTracking = NRInput.SetInputSource(InputSourceEnum.Hands);
//returns true if input source switch to controller success bool
switchToController = NRInput.SetInputSource(InputSourceEnum.Controller);
//returns true if hand tracking is running bool isRunning =
//returns the NRHand of right-handness NRHand hand =
//returns true if user is now performing system gesture bool
isPerformingSystemGesture = NRInput.Hands.IsPerformingSystemGesture();
Details Of HandState:
//returns the HandState of right-handness
HandState handState = NRInput.Hands.GetHandState(HandEnum.RightHand);
//returns the handness of this hand
HandEnum handEnum = handState.handEnum;
//returns true if this hand is tracked
bool isTracked = handState.isTracked;
//returns the start pose of hand ray pointer
Pose pointerPose = handState.pointerPose;
//returns ture if hand ray pointer pose is valid
bool pointerValid = handState.pointerPoseValid;
//returns true if this hand is performing pinching
bool isPinching = handState.isPinching;
//returns the current pinch strength value of hand. The range is from 0 to 1
float pinchStrength = handState.pinchStrength;
//returns the current gesture of hand
HandGesture handGesture = handState.currentGesture;
//returns the pose which contains position and orientation of thumb tip joint
Pose thumbTipPose = handState.GetJointPose(HandJointID.ThumbTip);
- 2.Delete the
Main Camerafrom the scene hierarchy.
Assets>NRSDK>Prefabs>NRCameraRig. Drag them to the scene hierarchy.
4. Select the
NRInputGameObject in the
Hierarchywindow to open the
Inspectorwindow, and choose
Input Source Type.
Assets>NRSDK>Prefabs>Hands. Add them as child GameObjects of
Samples are included in the Unity package. Please refer to