Hand Tracking
Follows your hands and reads gestures like a fist, a pinch, a thumbs up or a peace sign. Ask for something your hand controls, for example drawing with a pinch.
Camera feed, hand and face tracking, touch, tilt, haptics, and sound.
Made with this blockInputs
occludeHandsbooleanWhether hands occlude 3d objects or let everything render over them.
leftHandDefaultJointstringThe default joint that objects are attached to, with the options being: palm,wrist,thumb-0,thumb-1,thumb-2,thumb-3,index-0,index-1,index-2,index-3,mid-0,mid-1,mid-2,mid-3,ring-0,ring-1,ring-2,ring-3,pinky-0,pinky-1,pinky-2,pinky-3,wrist_to_thumb,wrist_to_index,wrist_to_mid,wrist_to_ring,wrist_to_pinky. Note for numbered fingers: 0 = closer to palm and 3 = finger tip.
rightHandDefaultJointstringThe default joint that objects are attached to, with the options being: palm,wrist,thumb-0,thumb-1,thumb-2,thumb-3,index-0,index-1,index-2,index-3,mid-0,mid-1,mid-2,mid-3,ring-0,ring-1,ring-2,ring-3,pinky-0,pinky-1,pinky-2,pinky-3,wrist_to_thumb,wrist_to_index,wrist_to_mid,wrist_to_ring,wrist_to_pinky. Note for numbered fingers: 0 = closer to palm and 3 = finger tip.
Events
onLeftTrackingCalled each frame when leftHand is tracking, providing all the hand tracking data in a data object. Example usage: handTrackingComponent.onLeftTracking.add((data)=>{ print(data.joints.thumb1.position2D); // gets 2d screenspace position of thumb1 joint. print(data.position3D); // gets 3d position of the general hand. print(data.rotation3D); // gets z rotation of the general hand, useful for 3d outputs. print(data.rotation2D); // gets z rotation of the general hand, useful for 2d outputs. });
onRightTrackingCalled each frame when rightHand is tracking, providing all the hand tracking data in a data object. Example usage: handTrackingComponent.onRightTracking.add((data)=>{ print(data.joints.thumb1.position2D); // gets 2d screenspace position of thumb1 joint. print(data.position3D); // gets 3d position of the general hand. print(data.rotation3D); // gets z rotation of the general hand, useful for 3d outputs. print(data.rotation2D); // gets z rotation of the general hand, useful for 2d outputs. });
onLeftHandShowntriggered when left hand shown
onRightHandShowntriggered when right hand is visible.
onLeftHandHiddenTriggered when left hand is hidden
onRightHandHiddentriggered when right hand is hidden.
onLeftChefsKisscalled if left hand does chefs kiss gesture.
onRightChefsKisscalled if right hand does chefs kiss gesture.
onLeftThumbUpcalled if left hand does thumb up gesture.
onRightThumbUpcalled if right hand does thumb up gesture.
onLeftPointcalled if left hand does point gesture.
onRightPointcalled if right hand does point gesture.
onLeftPeacecalled if left hand does peace sign
onRightPeacecalled if right hand does peace sign
onLeftCount1Called when left hand counts 1
onRightCount1Called when right hand counts 1
onLeftCount2Called when left hand counts 2
onRightCount2Called when right hand counts 2
onLeftCount3Called when left hand counts 3
onRightCount3Called when right hand counts 3
onLeftCount4Called when left hand counts 4
onRightCount4Called when right hand counts 4
onLeftCount5Called when left hand counts 5
onRightCount5Called when right hand counts 5
onLeftPalmOpenCalled when left hand is opened fully.
onRightPalmOpenCalled when right hand is opened fully.
onLeftFistClosedCalled when left hand is closed fully. Useful for grabbing or holding objects with handles. E.g. use when holding a bottle.
onRightFistClosedCalled when right hand is closed fully. Useful for grabbing or holding objects with handles. E.g. use when holding a bottle.
onLeftPinchDownCalled when left hand index and thumb pinch down to pinch.
onRightPinchDownCalled when right hand index and thumb pinch down to pinch.
onLeftPinchUpCalled when left hand index and thumb release from pinching.
onRightPinchUpCalled when right hand index and thumb release from pinching.
onLeftRockWhen left hand makes a clench fist.
onRightRockWhen right hand makes a clench fist.
onLeftScissorsWhen left hand makes a scissors gesture.
onRightScissorsWhen right hand makes a scissors gesture.
onLeftPaperWhen left hand makes a paper gesture.
onRightPaperWhen right hand makes a paper gesture.
onLeftSwipeLeftcalled when left hand swipes to the left.
onLeftSwipeRightcalled when the left hand swipes to the right.
onLeftSwipeUpcalled when left hand swipes upwards.
onLeftSwipeDowncalled when left hand swipes downwards.
onRightSwipeLeftCalled when the right hand swipes left.
onRightSwipeRightCalled when the right hand swipes right.
onRightSwipeUpCalled when the right hand swipes upwards.
onRightSwipeDownCalled when the right hand swipes downwards.
More in Camera, Audio & Sensors
- Device CameraGives your Lens the camera picture, live or frozen as a still. Your Lens can show that picture on a surface, or keep the still to use later.
- Face EventsMakes your Lens react when you open your mouth, smile, kiss, raise your eyebrows or tilt your head. It also tells the Lens where your eyes, nose and mouth are on screen.
- Face MLChanges your face with one ready-made effect, for example an anime look, a meme grin or a skull. Say the look you want, and your Lens keeps that one effect.
- FaceLandmarksFollows where your eyes, nose, mouth and forehead are, so a sticker or text can sit on them and move with you. Ask for hearts on your eyes.
- GyroscopeTurns tilting and shaking your phone into a control for your Lens. Ask for a tilt game, for example a maze where you roll a ball to the exit.
- HapticsMakes your phone vibrate at the moments you choose. Ask for a buzz when you tap the screen or score a point.
- Picture in PicturePuts a frame with the live camera on the screen, with or without a border. Tap the frame to swap in a photo from your device.
- Selfie WidgetShows a small live camera view on the screen, as a circle or a rectangle. Choose where it sits and how big it is, for example in the corner of a game.
- SoundPlays a sound in the Lens. Add the sound you want, and the Lens can start it, pause it and resume it.
- Touch EventsAdds tap, drag and swipe controls, so you touch the screen to control the Lens. Say what each touch does, for example tap to drop a coin.
- Voice ChangerChanges your voice while you speak. Ask for the effect you want, for example a deep voice, a robot, an alien or an echo.
- ZoomZooms the view in on any point of the screen, smoothly or held in place the whole time. Say where to zoom, how close, and whether it repeats back and forth.
