Skip to content

Instantly share code, notes, and snippets.


tomaspietravallo/jhony.js Secret

Last active Oct 22, 2020
What would you like to do?
const Scene = require('Scene');
const FaceTracking = require('FaceTracking');
(async function () {
const wheat = await Scene.root.findFirst('object00');
// Store a refece to detected face
const face = FaceTracking.face(0);
const upperLipCenter = face.mouth.upperLipCenter;
wheat.transform.x = upperLipCenter.x;
wheat.transform.y = upperLipCenter.y;
wheat.transform.z = upperLipCenter.z;
wheat.transform.rotationX = upperLipCenter.x;
wheat.transform.rotationY = upperLipCenter.y;
wheat.transform.rotationZ = upperLipCenter.z;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment