ARFaceAnchor

Inherits: RefCounted < Object

A tracked face anchor with mesh, eye, and expression data.

Description

Represents a tracked face mesh, eye transforms, gaze direction, and blend-shape coefficients. Use 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.

Properties

PackedVector2Array

geometry_texture_coordinates

PackedVector2Array()

PackedVector3Array

geometry_vertices

PackedVector3Array()

String

identifier

""

bool

is_tracked

false

Transform3D

left_eye_transform

Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)

Vector3

look_at_point

Vector3(0, 0, 0)

Transform3D

right_eye_transform

Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)

Transform3D

transform

Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)

PackedInt32Array

triangle_indices

PackedInt32Array()

Methods

float

get_blend_shape_value(location: BlendShapeLocation)


Enumerations

enum BlendShapeLocation: 🔗

Blend shape coefficient for eye blink left.

BlendShapeLocation EYE_LOOK_DOWN_LEFT = 1

Blend shape coefficient for eye look down left.

BlendShapeLocation EYE_LOOK_IN_LEFT = 2

Blend shape coefficient for eye look in left.

BlendShapeLocation EYE_LOOK_OUT_LEFT = 3

Blend shape coefficient for eye look out left.

BlendShapeLocation EYE_LOOK_UP_LEFT = 4

Blend shape coefficient for eye look up left.

BlendShapeLocation EYE_SQUINT_LEFT = 5

Blend shape coefficient for eye squint left.

BlendShapeLocation EYE_WIDE_LEFT = 6

Blend shape coefficient for eye wide left.

Blend shape coefficient for eye blink right.

BlendShapeLocation EYE_LOOK_DOWN_RIGHT = 8

Blend shape coefficient for eye look down right.

BlendShapeLocation EYE_LOOK_IN_RIGHT = 9

Blend shape coefficient for eye look in right.

BlendShapeLocation EYE_LOOK_OUT_RIGHT = 10

Blend shape coefficient for eye look out right.

BlendShapeLocation EYE_LOOK_UP_RIGHT = 11

Blend shape coefficient for eye look up right.

BlendShapeLocation EYE_SQUINT_RIGHT = 12

Blend shape coefficient for eye squint right.

BlendShapeLocation EYE_WIDE_RIGHT = 13

Blend shape coefficient for eye wide right.

BlendShapeLocation JAW_FORWARD = 14

Blend shape coefficient for jaw forward.

BlendShapeLocation JAW_LEFT = 15

Blend shape coefficient for jaw left.

BlendShapeLocation JAW_RIGHT = 16

Blend shape coefficient for jaw right.

BlendShapeLocation JAW_OPEN = 17

Blend shape coefficient for jaw open.

BlendShapeLocation MOUTH_CLOSE = 18

Blend shape coefficient for mouth close.

BlendShapeLocation MOUTH_FUNNEL = 19

Blend shape coefficient for mouth funnel.

BlendShapeLocation MOUTH_PUCKER = 20

Blend shape coefficient for mouth pucker.

BlendShapeLocation MOUTH_LEFT = 21

Blend shape coefficient for mouth left.

BlendShapeLocation MOUTH_RIGHT = 22

Blend shape coefficient for mouth right.

BlendShapeLocation MOUTH_SMILE_LEFT = 23

Blend shape coefficient for mouth smile left.

BlendShapeLocation MOUTH_SMILE_RIGHT = 24

Blend shape coefficient for mouth smile right.

BlendShapeLocation MOUTH_FROWN_LEFT = 25

Blend shape coefficient for mouth frown left.

BlendShapeLocation MOUTH_FROWN_RIGHT = 26

Blend shape coefficient for mouth frown right.

BlendShapeLocation MOUTH_DIMPLE_LEFT = 27

Blend shape coefficient for mouth dimple left.

BlendShapeLocation MOUTH_DIMPLE_RIGHT = 28

Blend shape coefficient for mouth dimple right.

BlendShapeLocation MOUTH_STRETCH_LEFT = 29

Blend shape coefficient for mouth stretch left.

BlendShapeLocation MOUTH_STRETCH_RIGHT = 30

Blend shape coefficient for mouth stretch right.

BlendShapeLocation MOUTH_ROLL_LOWER = 31

Blend shape coefficient for mouth roll lower.

BlendShapeLocation MOUTH_ROLL_UPPER = 32

Blend shape coefficient for mouth roll upper.

BlendShapeLocation MOUTH_SHRUG_LOWER = 33

Blend shape coefficient for mouth shrug lower.

BlendShapeLocation MOUTH_SHRUG_UPPER = 34

Blend shape coefficient for mouth shrug upper.

BlendShapeLocation MOUTH_PRESS_LEFT = 35

Blend shape coefficient for mouth press left.

BlendShapeLocation MOUTH_PRESS_RIGHT = 36

Blend shape coefficient for mouth press right.

BlendShapeLocation MOUTH_LOWER_DOWN_LEFT = 37

Blend shape coefficient for mouth lower down left.

BlendShapeLocation MOUTH_LOWER_DOWN_RIGHT = 38

Blend shape coefficient for mouth lower down right.

BlendShapeLocation MOUTH_UPPER_UP_LEFT = 39

Blend shape coefficient for mouth upper up left.

BlendShapeLocation MOUTH_UPPER_UP_RIGHT = 40

Blend shape coefficient for mouth upper up right.

BlendShapeLocation BROW_DOWN_LEFT = 41

Blend shape coefficient for brow down left.

BlendShapeLocation BROW_DOWN_RIGHT = 42

Blend shape coefficient for brow down right.

BlendShapeLocation BROW_INNER_UP = 43

Blend shape coefficient for brow inner up.

BlendShapeLocation BROW_OUTER_UP_LEFT = 44

Blend shape coefficient for brow outer up left.

BlendShapeLocation BROW_OUTER_UP_RIGHT = 45

Blend shape coefficient for brow outer up right.

BlendShapeLocation CHEEK_PUFF = 46

Blend shape coefficient for cheek puff.

BlendShapeLocation CHEEK_SQUINT_LEFT = 47

Blend shape coefficient for cheek squint left.

BlendShapeLocation CHEEK_SQUINT_RIGHT = 48

Blend shape coefficient for cheek squint right.

BlendShapeLocation NOSE_SNEER_LEFT = 49

Blend shape coefficient for nose sneer left.

BlendShapeLocation NOSE_SNEER_RIGHT = 50

Blend shape coefficient for nose sneer right.

BlendShapeLocation TONGUE_OUT = 51

Blend shape coefficient for tongue out.


Property Descriptions

PackedVector2Array geometry_texture_coordinates = PackedVector2Array() 🔗

  • void set_geometry_texture_coordinates(value: PackedVector2Array)

  • 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 PackedVector2Array for more details.


PackedVector3Array geometry_vertices = PackedVector3Array() 🔗

  • void set_geometry_vertices(value: PackedVector3Array)

  • 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 PackedVector3Array for more details.


String identifier = "" 🔗

  • void set_identifier(value: String)

  • String get_identifier()

A unique identifier for this face anchor.


bool is_tracked = false 🔗

  • void set_is_tracked(value: bool)

  • bool get_is_tracked()

Whether the face is currently tracked with reliable data.


Transform3D left_eye_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) 🔗

  • void set_left_eye_transform(value: Transform3D)

  • Transform3D get_left_eye_transform()

The transform of the left eye relative to the face anchor.


Vector3 look_at_point = Vector3(0, 0, 0) 🔗

  • void set_look_at_point(value: Vector3)

  • Vector3 get_look_at_point()

A point in face space representing the user’s gaze direction.


Transform3D right_eye_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) 🔗

  • void set_right_eye_transform(value: Transform3D)

  • Transform3D get_right_eye_transform()

The transform of the right eye relative to the face anchor.


Transform3D transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) 🔗

  • void set_transform(value: Transform3D)

  • Transform3D get_transform()

The face anchor transform in world space.


PackedInt32Array triangle_indices = PackedInt32Array() 🔗

  • void set_triangle_indices(value: PackedInt32Array)

  • 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 PackedInt32Array for more details.


Method Descriptions

float get_blend_shape_value(location: BlendShapeLocation) 🔗

Returns the current coefficient for the requested face blend shape. Values are typically in the range 0.0 to 1.0.