Ejemplo n.º 1
0
        void OnUpdated(ARFaceUpdatedEventArgs eventArgs)
        {
            using (var blendShapes = arKitFaceSubsystem.GetBlendShapeCoefficients(face.trackableId, Allocator.Temp))
            {
                var list = blendShapes.Select(blendShapeCoefficient => (Enum.GetName(typeof(ARKitBlendShapeLocation), blendShapeCoefficient.blendShapeLocation), blendShapeCoefficient.coefficient)).ToList();
                udp.Send(transform, eventArgs.face, list);

                var t = "";
                foreach (var c in list)
                {
                    t += c.Item1 + c.Item2.ToString() + "\n";
                }
                text.text = t;
            }
        }
Ejemplo n.º 2
0
    void OnUpdated(ARFaceUpdatedEventArgs eventArgs)
    {
        if (arFace.leftEye != null && leftEye == null)
        {
            leftEye = Instantiate(leftEyePrefab, arFace.leftEye);
            leftEye.SetActive(false);
        }
        if (arFace.rightEye != null && rightEye == null)
        {
            rightEye = Instantiate(rightEyePrefab, arFace.rightEye);
            rightEye.SetActive(false);
        }

        // set visibility
        bool shouldBeVisible = (arFace.trackingState == TrackingState.Tracking) && (ARSession.state > ARSessionState.Ready);

        SetVisibility(shouldBeVisible);
    }
Ejemplo n.º 3
0
    /// <summary>
    /// Callback detects any changes that are made to the AR Face data.
    /// </summary>
    /// <param name="eventArgs"></param>
    void OnUpdated(ARFaceUpdatedEventArgs eventArgs)
    {
        if (arFace.leftEye != null && eyeLeft == null)
        {
            eyeLeft = Instantiate(eyePrefab, arFace.leftEye);

            eyeLeft.SetActive(false);
        }

        if (arFace.rightEye != null && eyeRight == null)
        {
            eyeRight = Instantiate(eyePrefab, arFace.rightEye);

            eyeRight.SetActive(false);
        }

        arEyeTrackingState = (arFace.trackingState == TrackingState.Tracking) && (ARSession.state > ARSessionState.Ready);

        UpdateScreenReticle();

        SetVisibility(arEyeTrackingState);
    }
 void OnUpdated(ARFaceUpdatedEventArgs eventArgs)
 {
     UpdateVisibility();
     UpdateFaceFeatures();
 }
Ejemplo n.º 5
0
 private void TryToUpdateModelStatus(ARFaceUpdatedEventArgs eventArgs)
 {
     TryToUpdateModelStatus();
 }
Ejemplo n.º 6
0
 void OnUpdated(ARFaceUpdatedEventArgs eventArgs) => UpdateFaceFeatures();
Ejemplo n.º 7
0
 void OnUpdated(ARFaceUpdatedEventArgs eventArgs)
 {
     UpdateActivity();
     Detect();
 }
Ejemplo n.º 8
0
 void OnUpdated(ARFaceUpdatedEventArgs eventArgs)
 {
     UpdateFaceFeatures();
     collisionArea.transform.position = transform.position - collisionAreaOffset;
 }
Ejemplo n.º 9
0
 void OnUpdated(ARFaceUpdatedEventArgs eventArgs)
 {
     CreateEyeGameObjectsIfNecessary();
     SetVisible((m_Face.trackingState == TrackingState.Tracking) && (ARSession.state > ARSessionState.Ready));
 }