:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/../../GodotApplePlugins/doc_classes/ARFaceAnchor.xml. .. _class_ARFaceAnchor: ARFaceAnchor ============ **Inherits:** :ref:`RefCounted` **<** :ref:`Object` A tracked face anchor with mesh, eye, and expression data. .. rst-class:: classref-introduction-group Description ----------- Represents a tracked face mesh, eye transforms, gaze direction, and blend-shape coefficients. Use :ref:`get_blend_shape_value()` to drive facial animation or avatar rigs. **iOS only.** Requires a TrueDepth-capable device. On visionOS and macOS, this type exists for API consistency but is never populated with live face-tracking data. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-----------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`geometry_texture_coordinates` | ``PackedVector2Array()`` | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`geometry_vertices` | ``PackedVector3Array()`` | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`String` | :ref:`identifier` | ``""`` | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`bool` | :ref:`is_tracked` | ``false`` | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Transform3D` | :ref:`left_eye_transform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Vector3` | :ref:`look_at_point` | ``Vector3(0, 0, 0)`` | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Transform3D` | :ref:`right_eye_transform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Transform3D` | :ref:`transform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`triangle_indices` | ``PackedInt32Array()`` | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_blend_shape_value`\ (\ location\: :ref:`BlendShapeLocation`\ ) | +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ARFaceAnchor_BlendShapeLocation: .. rst-class:: classref-enumeration enum **BlendShapeLocation**: :ref:`🔗` .. _class_ARFaceAnchor_constant_EYE_BLINK_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_BLINK_LEFT** = ``0`` Blend shape coefficient for eye blink left. .. _class_ARFaceAnchor_constant_EYE_LOOK_DOWN_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_LOOK_DOWN_LEFT** = ``1`` Blend shape coefficient for eye look down left. .. _class_ARFaceAnchor_constant_EYE_LOOK_IN_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_LOOK_IN_LEFT** = ``2`` Blend shape coefficient for eye look in left. .. _class_ARFaceAnchor_constant_EYE_LOOK_OUT_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_LOOK_OUT_LEFT** = ``3`` Blend shape coefficient for eye look out left. .. _class_ARFaceAnchor_constant_EYE_LOOK_UP_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_LOOK_UP_LEFT** = ``4`` Blend shape coefficient for eye look up left. .. _class_ARFaceAnchor_constant_EYE_SQUINT_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_SQUINT_LEFT** = ``5`` Blend shape coefficient for eye squint left. .. _class_ARFaceAnchor_constant_EYE_WIDE_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_WIDE_LEFT** = ``6`` Blend shape coefficient for eye wide left. .. _class_ARFaceAnchor_constant_EYE_BLINK_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_BLINK_RIGHT** = ``7`` Blend shape coefficient for eye blink right. .. _class_ARFaceAnchor_constant_EYE_LOOK_DOWN_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_LOOK_DOWN_RIGHT** = ``8`` Blend shape coefficient for eye look down right. .. _class_ARFaceAnchor_constant_EYE_LOOK_IN_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_LOOK_IN_RIGHT** = ``9`` Blend shape coefficient for eye look in right. .. _class_ARFaceAnchor_constant_EYE_LOOK_OUT_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_LOOK_OUT_RIGHT** = ``10`` Blend shape coefficient for eye look out right. .. _class_ARFaceAnchor_constant_EYE_LOOK_UP_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_LOOK_UP_RIGHT** = ``11`` Blend shape coefficient for eye look up right. .. _class_ARFaceAnchor_constant_EYE_SQUINT_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_SQUINT_RIGHT** = ``12`` Blend shape coefficient for eye squint right. .. _class_ARFaceAnchor_constant_EYE_WIDE_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **EYE_WIDE_RIGHT** = ``13`` Blend shape coefficient for eye wide right. .. _class_ARFaceAnchor_constant_JAW_FORWARD: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **JAW_FORWARD** = ``14`` Blend shape coefficient for jaw forward. .. _class_ARFaceAnchor_constant_JAW_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **JAW_LEFT** = ``15`` Blend shape coefficient for jaw left. .. _class_ARFaceAnchor_constant_JAW_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **JAW_RIGHT** = ``16`` Blend shape coefficient for jaw right. .. _class_ARFaceAnchor_constant_JAW_OPEN: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **JAW_OPEN** = ``17`` Blend shape coefficient for jaw open. .. _class_ARFaceAnchor_constant_MOUTH_CLOSE: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_CLOSE** = ``18`` Blend shape coefficient for mouth close. .. _class_ARFaceAnchor_constant_MOUTH_FUNNEL: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_FUNNEL** = ``19`` Blend shape coefficient for mouth funnel. .. _class_ARFaceAnchor_constant_MOUTH_PUCKER: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_PUCKER** = ``20`` Blend shape coefficient for mouth pucker. .. _class_ARFaceAnchor_constant_MOUTH_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_LEFT** = ``21`` Blend shape coefficient for mouth left. .. _class_ARFaceAnchor_constant_MOUTH_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_RIGHT** = ``22`` Blend shape coefficient for mouth right. .. _class_ARFaceAnchor_constant_MOUTH_SMILE_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_SMILE_LEFT** = ``23`` Blend shape coefficient for mouth smile left. .. _class_ARFaceAnchor_constant_MOUTH_SMILE_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_SMILE_RIGHT** = ``24`` Blend shape coefficient for mouth smile right. .. _class_ARFaceAnchor_constant_MOUTH_FROWN_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_FROWN_LEFT** = ``25`` Blend shape coefficient for mouth frown left. .. _class_ARFaceAnchor_constant_MOUTH_FROWN_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_FROWN_RIGHT** = ``26`` Blend shape coefficient for mouth frown right. .. _class_ARFaceAnchor_constant_MOUTH_DIMPLE_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_DIMPLE_LEFT** = ``27`` Blend shape coefficient for mouth dimple left. .. _class_ARFaceAnchor_constant_MOUTH_DIMPLE_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_DIMPLE_RIGHT** = ``28`` Blend shape coefficient for mouth dimple right. .. _class_ARFaceAnchor_constant_MOUTH_STRETCH_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_STRETCH_LEFT** = ``29`` Blend shape coefficient for mouth stretch left. .. _class_ARFaceAnchor_constant_MOUTH_STRETCH_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_STRETCH_RIGHT** = ``30`` Blend shape coefficient for mouth stretch right. .. _class_ARFaceAnchor_constant_MOUTH_ROLL_LOWER: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_ROLL_LOWER** = ``31`` Blend shape coefficient for mouth roll lower. .. _class_ARFaceAnchor_constant_MOUTH_ROLL_UPPER: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_ROLL_UPPER** = ``32`` Blend shape coefficient for mouth roll upper. .. _class_ARFaceAnchor_constant_MOUTH_SHRUG_LOWER: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_SHRUG_LOWER** = ``33`` Blend shape coefficient for mouth shrug lower. .. _class_ARFaceAnchor_constant_MOUTH_SHRUG_UPPER: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_SHRUG_UPPER** = ``34`` Blend shape coefficient for mouth shrug upper. .. _class_ARFaceAnchor_constant_MOUTH_PRESS_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_PRESS_LEFT** = ``35`` Blend shape coefficient for mouth press left. .. _class_ARFaceAnchor_constant_MOUTH_PRESS_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_PRESS_RIGHT** = ``36`` Blend shape coefficient for mouth press right. .. _class_ARFaceAnchor_constant_MOUTH_LOWER_DOWN_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_LOWER_DOWN_LEFT** = ``37`` Blend shape coefficient for mouth lower down left. .. _class_ARFaceAnchor_constant_MOUTH_LOWER_DOWN_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_LOWER_DOWN_RIGHT** = ``38`` Blend shape coefficient for mouth lower down right. .. _class_ARFaceAnchor_constant_MOUTH_UPPER_UP_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_UPPER_UP_LEFT** = ``39`` Blend shape coefficient for mouth upper up left. .. _class_ARFaceAnchor_constant_MOUTH_UPPER_UP_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **MOUTH_UPPER_UP_RIGHT** = ``40`` Blend shape coefficient for mouth upper up right. .. _class_ARFaceAnchor_constant_BROW_DOWN_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **BROW_DOWN_LEFT** = ``41`` Blend shape coefficient for brow down left. .. _class_ARFaceAnchor_constant_BROW_DOWN_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **BROW_DOWN_RIGHT** = ``42`` Blend shape coefficient for brow down right. .. _class_ARFaceAnchor_constant_BROW_INNER_UP: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **BROW_INNER_UP** = ``43`` Blend shape coefficient for brow inner up. .. _class_ARFaceAnchor_constant_BROW_OUTER_UP_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **BROW_OUTER_UP_LEFT** = ``44`` Blend shape coefficient for brow outer up left. .. _class_ARFaceAnchor_constant_BROW_OUTER_UP_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **BROW_OUTER_UP_RIGHT** = ``45`` Blend shape coefficient for brow outer up right. .. _class_ARFaceAnchor_constant_CHEEK_PUFF: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **CHEEK_PUFF** = ``46`` Blend shape coefficient for cheek puff. .. _class_ARFaceAnchor_constant_CHEEK_SQUINT_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **CHEEK_SQUINT_LEFT** = ``47`` Blend shape coefficient for cheek squint left. .. _class_ARFaceAnchor_constant_CHEEK_SQUINT_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **CHEEK_SQUINT_RIGHT** = ``48`` Blend shape coefficient for cheek squint right. .. _class_ARFaceAnchor_constant_NOSE_SNEER_LEFT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **NOSE_SNEER_LEFT** = ``49`` Blend shape coefficient for nose sneer left. .. _class_ARFaceAnchor_constant_NOSE_SNEER_RIGHT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **NOSE_SNEER_RIGHT** = ``50`` Blend shape coefficient for nose sneer right. .. _class_ARFaceAnchor_constant_TONGUE_OUT: .. rst-class:: classref-enumeration-constant :ref:`BlendShapeLocation` **TONGUE_OUT** = ``51`` Blend shape coefficient for tongue out. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ARFaceAnchor_property_geometry_texture_coordinates: .. rst-class:: classref-property :ref:`PackedVector2Array` **geometry_texture_coordinates** = ``PackedVector2Array()`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_geometry_texture_coordinates**\ (\ value\: :ref:`PackedVector2Array`\ ) - :ref:`PackedVector2Array` **get_geometry_texture_coordinates**\ (\ ) Texture coordinates for the face mesh vertices. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. rst-class:: classref-item-separator ---- .. _class_ARFaceAnchor_property_geometry_vertices: .. rst-class:: classref-property :ref:`PackedVector3Array` **geometry_vertices** = ``PackedVector3Array()`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_geometry_vertices**\ (\ value\: :ref:`PackedVector3Array`\ ) - :ref:`PackedVector3Array` **get_geometry_vertices**\ (\ ) Face mesh vertices in anchor-local space. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. .. rst-class:: classref-item-separator ---- .. _class_ARFaceAnchor_property_identifier: .. rst-class:: classref-property :ref:`String` **identifier** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_identifier**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_identifier**\ (\ ) A unique identifier for this face anchor. .. rst-class:: classref-item-separator ---- .. _class_ARFaceAnchor_property_is_tracked: .. rst-class:: classref-property :ref:`bool` **is_tracked** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_is_tracked**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_is_tracked**\ (\ ) Whether the face is currently tracked with reliable data. .. rst-class:: classref-item-separator ---- .. _class_ARFaceAnchor_property_left_eye_transform: .. rst-class:: classref-property :ref:`Transform3D` **left_eye_transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_left_eye_transform**\ (\ value\: :ref:`Transform3D`\ ) - :ref:`Transform3D` **get_left_eye_transform**\ (\ ) The transform of the left eye relative to the face anchor. .. rst-class:: classref-item-separator ---- .. _class_ARFaceAnchor_property_look_at_point: .. rst-class:: classref-property :ref:`Vector3` **look_at_point** = ``Vector3(0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_look_at_point**\ (\ value\: :ref:`Vector3`\ ) - :ref:`Vector3` **get_look_at_point**\ (\ ) A point in face space representing the user's gaze direction. .. rst-class:: classref-item-separator ---- .. _class_ARFaceAnchor_property_right_eye_transform: .. rst-class:: classref-property :ref:`Transform3D` **right_eye_transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_right_eye_transform**\ (\ value\: :ref:`Transform3D`\ ) - :ref:`Transform3D` **get_right_eye_transform**\ (\ ) The transform of the right eye relative to the face anchor. .. rst-class:: classref-item-separator ---- .. _class_ARFaceAnchor_property_transform: .. rst-class:: classref-property :ref:`Transform3D` **transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_transform**\ (\ value\: :ref:`Transform3D`\ ) - :ref:`Transform3D` **get_transform**\ (\ ) The face anchor transform in world space. .. rst-class:: classref-item-separator ---- .. _class_ARFaceAnchor_property_triangle_indices: .. rst-class:: classref-property :ref:`PackedInt32Array` **triangle_indices** = ``PackedInt32Array()`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_triangle_indices**\ (\ value\: :ref:`PackedInt32Array`\ ) - :ref:`PackedInt32Array` **get_triangle_indices**\ (\ ) Triangle indices for the face mesh. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ARFaceAnchor_method_get_blend_shape_value: .. rst-class:: classref-method :ref:`float` **get_blend_shape_value**\ (\ location\: :ref:`BlendShapeLocation`\ ) :ref:`🔗` Returns the current coefficient for the requested face blend shape. Values are typically in the range ``0.0`` to ``1.0``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`