Face Events
Makes 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.
Camera feed, hand and face tracking, touch, tilt, haptics, and sound.
Made with this blockInputs
enableHintbooleanShows a system hint (on screen instruction) for the relevant interaction for face events, true by default unless the lens shows it's own hint through text or another means.
Events
onFaceFoundthis event is triggered when a face is found in the image and is being tracked
onFaceLostThis event is being triggered when a tracked face is lost
onMouthOpenedThis event is being triggered when the user opens the mouth
onMouthClosedThis event is being triggered when the user closes the mouth
onSmileStartedThis event is triggered when the user smiles
onSmileFinishedEvent is triggered when the user stops smiling
onKissStartedThis event is triggered when a kiss starts
onKissFinishedEvent is triggered when a kiss is finished
onBrowsRaisedThis event is triggered when the user raise the eyebrows
onBrowsLoweredThis event is triggered when a user lowers the eyebrows
onBrowsNormalThis event is triggered when a user returns the eyebrows to a normal (natural) position
onTiltLeftAn event called when the user tilts their head to the left. Use this or onTiltRight if a user requests changing something using head tilt.
onTiltRightAn event called when the user tilts their head to the right. Use this or onTiltLeft if a user requests changing something using head tilt.
onTiltCenterAn event called when the user re-centers their head after tilting it to one side.
Functions
getHeadAnglefloatGets the head tilt angle ranging from 0 to 90.0 when the user tilts left and 0 to -90.0 when the user tilts to the right.
getNosePosition2Dvec2Gets the 2D nose position of the user in screen space as a vec2 ranging from (0.0,0.0) - top left corner to (1.0,1.0) - bottom right corner.
getLeftEyePosition2Dvec2Gets the 2D left eye position of the user in screen space as a vec2 ranging from (0.0,0.0) - top left corner to (1.0,1.0) - bottom right corner.
getRightEyePosition2Dvec2Gets the 2D right eye position of the user in screen space as a vec2 ranging from (0.0,0.0) - top left corner to (1.0,1.0) - bottom right corner.
getMouthPosition2Dvec2Gets the 2D mouth position of the user in screen space as a vec2 ranging from (0.0,0.0) - top left corner to (1.0,1.0) - bottom right corner.
getHeadCenterPosition2Dvec2Gets the 2D head center position of the user in screen space as a vec2 ranging from (0.0,0.0) - top left corner to (1.0,1.0) - bottom right corner.
getForeheadPosition2Dvec2Gets the 2D forehead position of the user in screen space as a vec2 ranging from (0.0,0.0) - top left corner to (1.0,1.0) - bottom right corner.
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 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.
- Hand TrackingFollows 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.
- 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.
