// Use this for initialization
function onStart() {
Debug.log("STARTED")
Debug.log("MOUTH_OPEN_SENSITIVE: " + Utility.MOUTH_OPEN_SENSITIVE)
Debug.log("MOUTH_CLOSED_SENSITIVE: " + Utility.MOUTH_CLOSED_SENSITIVE)
}
// Update is called once per frame
function onUpdate() {
}
// Update is called once per frame
function onTriggerStateChanged(triggerType, state, faceId){
Debug.log(triggerType + ": " + state)
if(triggerType === Utility.MOUTH_OPEN_SENSITIVE){
Debug.log("MOUTH_OPEN_SENSITIVE: " + state)
}
if(triggerType === Utility.MOUTH_CLOSED_SENSITIVE){
Debug.log("MOUTH_CLOSED_SENSITIVE: " + state)
}
}
This code outputs undefined on start and some uint for face triggers. I’m not able to identify the corrects uint.
// Use this for initialization
function onStart() {
Debug.log("STARTED")
Debug.log("MOUTH_OPEN_SENSITIVE: " + Utility.TriggerType.MOUTH_OPEN_SENSITIVE)
Debug.log("MOUTH_CLOSED_SENSITIVE: " + Utility.TriggerType.MOUTH_CLOSED_SENSITIVE)
}
// Update is called once per frame
function onUpdate() {
}
// Update is called once per frame
function onTriggerStateChanged(triggerType, state, faceId){
//Debug.log(triggerType + ": " + state)
if(triggerType === Utility.TriggerType.MOUTH_OPEN_SENSITIVE){
Debug.log("MOUTH_OPEN_SENSITIVE: " + state)
}
if(triggerType === Utility.TriggerType.MOUTH_CLOSED_SENSITIVE){
Debug.log("MOUTH_CLOSED_SENSITIVE: " + state)
}
}
It’s Utility.TriggerType.TRIGGER_NAME
Otherwise, you did it correctly
Some expanding on the scrips docs is planned, for now feel free to ask me if you get stuck or would like to see anything else documented in more detail.