Control Avatar (Mediapipe)
Describe how to control MYTY Avatar movement with Mediapipe
We should provide motion captured results to MYTY Avatars to make them mimic us. This interface shows how to deliver the Mediapipe results.
Motion captured result of face
Motion captured result of pose
Width of camera reference
Height of camera reference
function OnHolisticResult(result: Results)
{
const motionData = {
face: result.faceLandmarks,
pose: result.poseLandmarks,
width: cameraRef.current?.videoWidth,
height: cameraRef.current?.videoHeight
}
sendMessage("MessageHandler", "ProcessCapturedResult", JSON.stringify(motionData));
}
Last modified 4mo ago