MyAvatar

Available in: Interface Scripts Client Entity Scripts

Your avatar is your in-world representation of you. The MyAvatar API is used to manipulate the avatar. For example, you can customize the avatar's appearance, run custom avatar animations, change the avatar's position within the domain, or manage the avatar's collisions with other objects.
Methods

Signals

Type Definitions

Properties:
Name Type Default Description
qmlPosition Vec3 A synonym for position for use by QML.
shouldRenderLocally boolean true If true then your avatar is rendered for you in Interface, otherwise it is not rendered for you (but it is still rendered for other users).
motorVelocity Vec3 Vec3.ZERO The target velocity of your avatar to be achieved by a scripted motor.
motorTimescale number 1000000 The timescale for the scripted motor to achieve the target motorVelocity avatar velocity. Smaller values result in higher acceleration.
motorReferenceFrame string "camera" Reference frame of the motorVelocity. Must be one of the following: "camera", "avatar", and "world".
motorMode string "simple" The Type of scripted motor behavior: "simple" to use the motorTimescale time scale; "dynamic" to use character controller timescales.
collisionSoundURL string "Body_Hits_Impact.wav" The sound that's played when the avatar experiences a collision. It can be a mono or stereo 16-bit WAV file running at either 24kHz or 48kHz. The latter is down-sampled by the audio mixer, so all audio effectively plays back at a 24khz. 48kHz RAW files are also supported.
audioListenerMode number 0 Specifies the listening position when hearing spatialized audio. Must be one of the following property values:
audioListenerModeHead
audioListenerModeCamera
audioListenerModeCustom
audioListenerModeHead number 0 The audio listening position is at the avatar's head. Read-only.
audioListenerModeCamera number 1 The audio listening position is at the camera. Read-only.
audioListenerModeCustom number 2 The audio listening position is at a the position specified by set by the customListenPosition and customListenOrientation property values. Read-only.
customListenPosition Vec3 Vec3.ZERO The listening position used when the audioListenerMode property value is audioListenerModeCustom.
customListenOrientation Quat Quat.IDENTITY The listening orientation used when the audioListenerMode property value is audioListenerModeCustom.
leftHandPosition Vec3 The position of the left hand in avatar coordinates if it's being positioned by controllers, otherwise Vec3.ZERO. Read-only.
rightHandPosition Vec3 The position of the right hand in avatar coordinates if it's being positioned by controllers, otherwise Vec3.ZERO. Read-only.
leftHandTipPosition Vec3 The position 30cm offset from the left hand in avatar coordinates if it's being positioned by controllers, otherwise Vec3.ZERO. Read-only.
rightHandTipPosition Vec3 The position 30cm offset from the right hand in avatar coordinates if it's being positioned by controllers, otherwise Vec3.ZERO. Read-only.
leftHandPose Pose The pose of the left hand as determined by the hand controllers. Read-only.
rightHandPose Pose The pose right hand position as determined by the hand controllers. Read-only.
leftHandTipPose Pose The pose of the left hand as determined by the hand controllers, with the position by 30cm. Read-only.
rightHandTipPose Pose The pose of the right hand as determined by the hand controllers, with the position by 30cm. Read-only.
hmdLeanRecenterEnabled boolean true If true then the avatar is re-centered to be under the head's position. In room-scale VR, this behavior is what causes your avatar to follow your HMD as you walk around the room. Setting the value false is useful if you want to pin the avatar to a fixed position.
collisionsEnabled boolean Set to true to enable collisions for the avatar, false to disable collisions. May return true even though the value was set false because the zone may disallow collisionless avatars.
characterControllerEnabled boolean Synonym of collisionsEnabled. Deprecated: Use collisionsEnabled instead.
useAdvancedMovementControls boolean Returns the value of the Interface setting, Settings > Advanced Movement for Hand Controller. Note: Setting the value has no effect unless Interface is restarted.
yawSpeed number 75
pitchSpeed number 50
hmdRollControlEnabled boolean true If true, the roll angle of your HMD turns your avatar while flying.
hmdRollControlDeadZone number 8 The amount of HMD roll, in degrees, required before your avatar turns if hmdRollControlEnabled is enabled.
hmdRollControlRate number If hmdRollControlEnabled is true, this value determines the maximum turn rate of your avatar when rolling your HMD in degrees per second.
userHeight number 1.75 The height of the user in sensor space.
userEyeHeight number 1.65 The estimated height of the user's eyes in sensor space. Read-only.
SELF_ID Uuid UUID representing "my avatar". Only use for local-only entities and overlays in situations where MyAvatar.sessionUUID is not available (e.g., if not connected to a domain). Note: Likely to be deprecated. Read-only.
walkSpeed number
skeletonOffset Vec3 Can be used to apply a translation offset between the avatar's position and the registration point of the 3D model.
position Vec3
scale number
density number Read-only.
handPosition Vec3
bodyYaw number The rotation left or right about an axis running from the head to the feet of the avatar. Yaw is sometimes called "heading".
bodyPitch number The rotation about an axis running from shoulder to shoulder of the avatar. Pitch is sometimes called "elevation".
bodyRoll number The rotation about an axis running from the chest to the back of the avatar. Roll is sometimes called "bank".
orientation Quat
headOrientation Quat The orientation of the avatar's head.
headPitch number The rotation about an axis running from ear to ear of the avatar's head. Pitch is sometimes called "elevation".
headYaw number The rotation left or right about an axis running from the base to the crown of the avatar's head. Yaw is sometimes called "heading".
headRoll number The rotation about an axis running from the nose to the back of the avatar's head. Roll is sometimes called "bank".
velocity Vec3
angularVelocity Vec3
audioLoudness number
audioAverageLoudness number
displayName string
sessionDisplayName string Sanitized, defaulted version displayName that is defined by the AvatarMixer rather than by Interface clients. The result is unique among all avatars present at the time.
lookAtSnappingEnabled boolean
skeletonModelURL string
attachmentData Array.<AttachmentData>
jointNames Array.<string> The list of joints in the current avatar model. Read-only.
sessionUUID Uuid Read-only.
sensorToWorldMatrix Mat4 Read-only.
controllerLeftHandMatrix Mat4 Read-only.
controllerRightHandMatrix Mat4 Read-only.
sensorToWorldScale number Read-only.

Methods

addThrust(thrust)
Parameters:
Name Type Description
thrust Vec3
animGraphLoaded()
attach(modelURL, jointNameopt, translationopt, rotationopt, scaleopt, isSoftopt, allowDuplicatesopt, useSavedopt)
Attach a model to your avatar. For example, you can give your avatar a hat to wear, a guitar to hold, or a surfboard to stand on.

Note: Attached models are models only; they are not entities and can not be manipulated using the Entities API. Nor can you use this function to attach an entity (such as a sphere or a box) to your avatar.

Parameters:
Name Type Attributes Default Description
modelURL string The URL of the model to attach. Models can be .FBX or .OBJ format.
jointName string <optional>
"" The name of the avatar joint (see MyAvatar.getJointNames or Avatar.getJointNames) to attach the model to.
translation Vec3 <optional>
Vec3.ZERO The offset to apply to the model relative to the joint position.
rotation Quat <optional>
Quat.IDENTITY The rotation to apply to the model relative to the joint orientation.
scale number <optional>
1.0 The scale to apply to the model.
isSoft boolean <optional>
false If the model has a skeleton, set this to true so that the bones of the attached model's skeleton are be rotated to fit the avatar's current pose. isSoft is used, for example, to have clothing that moves with the avatar.
If true, the translation, rotation, and scale parameters are ignored.
allowDuplicates boolean <optional>
false
useSaved boolean <optional>
true
Example

Attach a cowboy hat to your avatar's head.

var attachment = {
   modelURL: "https://s3.amazonaws.com/hifi-public/tony/cowboy-hat.fbx",
   jointName: "Head",
   translation: {"x": 0, "y": 0.25, "z": 0},
   rotation: {"x": 0, "y": 0, "z": 0, "w": 1},
   scale: 1,
   isSoft: false
};

MyAvatar.attach(attachment.modelURL,
                attachment.jointName,
                attachment.translation,
                attachment.rotation,
                attachment.scale,
                attachment.isSoft);
centerBody()
Moves and orients the avatar, such that it is directly underneath the HMD, with toes pointed forward.
clearAvatarEntity(entityID)
Parameters:
Name Type Description
entityID Uuid
clearIKJointLimitHistory()
The internal inverse-kinematics system maintains a record of which joints are "locked". Sometimes it is useful to forget this history, to prevent contorted joints.
clearJointData(name)
Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default animation system including inverse kinematics for that joint.

Note: This is slightly slower than the function variation that specifies the joint index.

Parameters:
Name Type Description
name string The name of the joint.
Example

Offset and restore the position of your avatar's head.

// Move your avatar's head up by 25cm from where it should be.
MyAvatar.setJointTranslation("Neck", { x: 0, y: 0.25, z: 0 });

// Restore your avatar's head to its default position after 5s.
Script.setTimeout(function () {
   MyAvatar.clearJointData("Neck");
}, 5000);
clearJointData(index)
Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default animation system including inverse kinematics for that joint.

Note: This is slightly faster than the function variation that specifies the joint name.

Parameters:
Name Type Description
index number The index of the joint.
clearJointsData()
Clear all joint translations and rotations that have been set by script. This restores all motion from the default animation system including inverse kinematics for all joints.
Example

Set your avatar to it's default T-pose for a while.

// Set all joint translations and rotations to defaults.
var i, length, rotation, translation;
for (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {
   rotation = MyAvatar.getDefaultJointRotation(i);
   translation = MyAvatar.getDefaultJointTranslation(i);
   MyAvatar.setJointData(i, rotation, translation);
}

// Restore your avatar's motion after 5s.
Script.setTimeout(function () {
   MyAvatar.clearJointsData();
}, 5000);
clearPinOnJoint(index) → {boolean}
Parameters:
Name Type Description
index number
Returns:
Type: boolean
clearScaleRestriction()
decreaseSize()
Decrease the avatar's scale by five percent, down to a minimum scale of 0.25.
Example

Reset your avatar's size to default then shrink it 5 times.

MyAvatar.resetSize();

for (var i = 0; i < 5; i++){
   print ("Shrinking by 5 percent");
   MyAvatar.decreaseSize();
}
detachAll(modelURL, jointNameopt)
Detach all instances of a particular model from either a specific joint or all joints.
Parameters:
Name Type Attributes Default Description
modelURL string The URL of the model to detach.
jointName string <optional>
"" The name of the joint to detach the model from. If "", then the model is detached from all joints.
detachOne(modelURL, jointNameopt)
Detach the most recently attached instance of a particular model from either a specific joint or any joint.
Parameters:
Name Type Attributes Default Description
modelURL string The URL of the model to detach.
jointName string <optional>
"" The name of the joint to detach the model from. If "", then the most recently attached model is removed from which ever joint it was attached to.
disableDriveKey(key)
Parameters:
Name Type Description
key DriveKeys
enableDriveKey(key)
Parameters:
Name Type Description
key DriveKeys
getAbsoluteDefaultJointRotationInObjectFrame(index) → {Quat}
Provides read only access to the default joint rotations in avatar coordinates. The default pose of the avatar is defined by the position and orientation of all bones in the avatar's model file. Typically this is a T-pose.
Parameters:
Name Type Description
index number index number
Returns:
The rotation of this joint in avatar coordinates.
Type: Quat
getAbsoluteDefaultJointTranslationInObjectFrame(index) → {Vec3}
Provides read only access to the default joint translations in avatar coordinates. The default pose of the avatar is defined by the position and orientation of all bones in the avatar's model file. Typically this is a T-pose.
Parameters:
Name Type Description
index number index number
Returns:
The position of this joint in avatar coordinates.
Type: Vec3
getAbsoluteJointRotationInObjectFrame(index) → {Quat}
Parameters:
Name Type Description
index number
Returns:
Type: Quat
getAbsoluteJointTranslationInObjectFrame(index) → {Vec3}
Parameters:
Name Type Description
index number
Returns:
Type: Vec3
getAcceleration() → {Vec3}
Returns:
Type: Vec3
getAnimationRoles() → {Array.<string>}
Each avatar has an avatar-animation.json file that defines which animations are used and how they are blended together with procedural data (such as look at vectors, hand sensors etc.). Each animation specified in the avatar-animation.json file is known as an animation role. Animation roles map to easily understandable actions that the avatar can perform, such as "idleStand", "idleTalk", or "walkFwd." getAnimationRoles() is used get the list of animation roles defined in the avatar-animation.json.
Returns:
Array of role strings.
Type: Array.<string>
Example

Print the list of animation roles defined in the avatar's avatar-animation.json file to the debug log.

var roles = MyAvatar.getAnimationRoles();
print("Animation Roles:");
for (var i = 0; i < roles.length; i++) {
   print(roles[i]);
}
getAnimGraphOverrideUrl() → {string}
Returns:
Type: string
getAnimGraphUrl() → {string}
Returns:
Type: string
getAttachmentData() → {Array.<AttachmentData>}
Get information about all models currently attached to your avatar.
Returns:
Information about all models attached to your avatar.
Type: Array.< AttachmentData>
Example

Report the URLs of all current attachments.

var attachments = MyAvatar.getaAttachmentData();
for (var i = 0; i < attachments.length; i++) {
   print (attachments[i].modelURL);
}
getAttachmentsVariant() → {object}
Returns:
Type: object
getAvatarEntityData() → {object}
Returns:
Type: object
getAvatarScale() → {number}
Returns:
Type: number
getCharacterControllerEnabled() → {boolean}
Deprecated:
  • Yes
Returns:
Type: boolean
getClearOverlayWhenMoving() → {boolean}
Returns:
Type: boolean
getCollisionsEnabled() → {boolean}
Returns:
Type: boolean
getControllerLeftHandMatrix() → {Mat4}
Returns:
Type: Mat4
getControllerRightHandMatrix() → {Mat4}
Returns:
Type: Mat4
getDataRate(rateNameopt) → {number}
Parameters:
Name Type Attributes Default Description
rateName string <optional>
""
Returns:
Type: number
getDefaultEyePosition() → {Vec3}
Get the position in world coordinates of the point directly between your avatar's eyes assuming your avatar was in its default pose. This is a reference position; it does not change as your avatar's head moves relative to the avatar position.
Returns:
Default position between your avatar's eyes in world coordinates.
Type: Vec3
Example

Report your avatar's default eye position.

var defaultEyePosition = MyAvatar.getDefaultEyePosition();
print(JSON.stringify(defaultEyePosition));
getDefaultJointRotation(index) → {Quat}
Parameters:
Name Type Description
index number
Returns:
Type: Quat
getDefaultJointTranslation(index) → {Vec3}
Parameters:
Name Type Description
index number
Returns:
Type: Vec3
getDomainMaxScale() → {number}
Returns the maximum scale allowed for this avatar in the current domain. This value can change as the user changes avatars or when changing domains.
Returns:
maximum scale allowed for this avatar in the current domain.
Type: number
getDomainMinScale() → {number}
Returns the minimum scale allowed for this avatar in the current domain. This value can change as the user changes avatars or when changing domains.
Returns:
minimum scale allowed for this avatar in the current domain.
Type: number
getDominantHand() → {string}
Returns:
Type: string
getEnableMeshVisible() → {boolean}
Get whether or not your avatar mesh is visible.
Returns:
true if your avatar's mesh is visible, otherwise false.
Type: boolean
getEyeHeight() → {number}
Provides read only access to the current eye height of the avatar. This height is only an estimate and might be incorrect for avatars that are missing standard joints.
Returns:
Eye height of avatar in meters.
Type: number
getEyePosition() → {Vec3}
Get the current position of the point directly between the avatar's eyes.
Returns:
The current position of the point directly between the avatar's eyes.
Type: Vec3
Example

Report your avatar's current eye position.

var eyePosition = MyAvatar.getEyePosition();
print(JSON.stringify(eyePosition));
getFlyingEnabled() → {boolean}
Returns:
Type: boolean
getFullAvatarModelName() → {string}
Get the full avatar model name for the current avatar.
Returns:
The full avatar model name.
Type: string
Example

Report the current full avatar model name.

print(MyAvatar.getFullAvatarModelName());
getFullAvatarURLFromPreferences() → {string}
Get the complete URL for the current avatar.
Returns:
The full avatar model name.
Type: string
Example

Report the URL for the current avatar.

print(MyAvatar.getFullAvatarURLFromPreferences());
getGravity() → {number}
Returns:
Type: number
getHandState() → {string}
Returns:
Type: string
getHeadDeltaPitch() → {number}
Returns:
Type: number
getHeadFinalPitch() → {number}
Returns:
Type: number
getHeadFinalRoll() → {number}
Returns:
Type: number
getHeadFinalYaw() → {number}
Returns:
Type: number
getHeadPosition() → {Vec3}
Get the current position of the avatar's "Head" joint.
Returns:
The current position of the avatar's "Head" joint.
Type: Vec3
Example

Report the current position of your avatar's head.

print(JSON.stringify(MyAvatar.getHeadPosition()));
getHeight() → {number}
Provides read only access to the current height of the avatar. This height is only an estimate and might be incorrect for avatars that are missing standard joints.
Returns:
Height of avatar in meters.
Type: number
getHMDLeanRecenterEnabled() → {boolean}
Returns:
Type: boolean
getIKErrorOnLastSolve() → {number}
Returns:
Type: number
getJointIndex(name) → {number}
Get the joint index for a named joint. The joint index value is the position of the joint in the array returned by MyAvatar.getJointNames or Avatar.getJointNames.
Parameters:
Name Type Description
name string The name of the joint.
Returns:
The index of the joint.
Type: number
Example

Report the index of your avatar's left arm joint.

print(JSON.stringify(MyAvatar.getJointIndex("LeftArm"));
getJointNames() → {Array.<string>}
Get the names of all the joints in the current avatar.
Returns:
The joint names.
Type: Array.<string>
Example

Report the names of all the joints in your current avatar.

print(JSON.stringify(MyAvatar.getJointNames()));
getJointPosition(name) → {Vec3}
Get the position of a joint in the current avatar.
Parameters:
Name Type Description
name string The name of the joint.
Returns:
The position of the joint in world coordinates.
Type: Vec3
Example

Report the position of your avatar's hips.

print(JSON.stringify(MyAvatar.getJointPosition("Hips")));
getJointPosition(index) → {Vec3}
Get the position of a joint in the current avatar.
Parameters:
Name Type Description
index number The index of the joint.
Returns:
The position of the joint in world coordinates.
Type: Vec3
getJointRotation(index) → {Quat}
Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see Avatar Standards.
Parameters:
Name Type Description
index number The index of the joint.
Returns:
The rotation of the joint relative to its parent.
Type: Quat
getJointRotation(name) → {Quat}
Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see Avatar Standards.
Parameters:
Name Type Description
name string The name of the joint.
Returns:
The rotation of the joint relative to its parent.
Type: Quat
Example

Report the rotation of your avatar's hips joint.

print(JSON.stringify(MyAvatar.getJointRotation("Hips")));
getJointRotations() → {Array.<Quat>}
Get the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint.
Returns:
The rotations of all joints relative to each's parent. The values are in the same order as the array returned by MyAvatar.getJointNames or Avatar.getJointNames.
Type: Array.< Quat>
Example

Report the rotations of all your avatar's joints.

print(JSON.stringify(MyAvatar.getJointRotations()));
getJointTranslation(index) → {Vec3}
Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see Avatar Standards.
Parameters:
Name Type Description
index number The index of the joint.
Returns:
The translation of the joint relative to its parent.
Type: Vec3
getJointTranslation(name) → {Vec3}
Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see Avatar Standards.
Parameters:
Name Type Description
name number The name of the joint.
Returns:
The translation of the joint relative to its parent.
Type: Vec3
Example

Report the translation of your avatar's hips joint.

print(JSON.stringify(MyAvatar.getJointRotation("Hips")));
getJointTranslations() → {Array.<Vec3>}
Returns:
Type: Array.< Vec3>
getLeftHandPose() → {Pose}
Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a hand controller (e.g., Oculus Touch or Vive).

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints for hand animation.) If you are using the Leap Motion, the return value's valid property will be false and any pose values returned will not be meaningful.

Returns:
Type: Pose
Example

Report the pose of your avatar's left hand.

print(JSON.stringify(MyAvatar.getLeftHandPose()));
getLeftHandPosition() → {Vec3}
Get the position of the avatar's left hand as positioned by a hand controller (e.g., Oculus Touch or Vive).

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints for hand animation.)

Returns:
The position of the left hand in avatar coordinates if positioned by a hand controller, otherwise Vec3.ZERO.
Type: Vec3
Example

Report the position of your left hand relative to your avatar.

print(JSON.stringify(MyAvatar.getLeftHandPosition()));
getLeftHandTipPose() → {Pose}
Returns:
Type: Pose
getLeftHandTipPosition() → {Vec3}
Returns:
Type: Vec3
getLeftPalmPosition() → {Vec3}
Get the position of the left palm in world coordinates.
Returns:
The position of the left palm in world coordinates.
Type: Vec3
Example

Report the position of your avatar's left palm.

print(JSON.stringify(MyAvatar.getLeftPalmPosition()));
getLeftPalmRotation() → {Vec3}
Get the rotation of the left palm in world coordinates.
Returns:
The rotation of the left palm in world coordinates.
Type: Vec3
Example

Report the rotation of your avatar's left palm.

print(JSON.stringify(MyAvatar.getLeftPalmRotation()));
getNeckPosition() → {Vec3}
Get the position of the current avatar's neck in world coordinates.
Returns:
The position of the neck in world coordinates.
Type: Vec3
Example

Report the position of your avatar's neck.

print(JSON.stringify(MyAvatar.getNeckPosition()));
getOrientationForAudio() → {Quat}
Returns:
Type: Quat
getOrientationVar() → {object}
Returns:
Type: object
getParentID() → {Uuid}
Returns:
Type: Uuid
getParentJointIndex() → {number}
Returns:
Type: number
getPositionForAudio() → {Vec3}
Returns:
Type: Vec3
getRawDriveKey(key) → {number}
Parameters:
Name Type Description
key DriveKeys
Returns:
Type: number
getRightHandPose() → {Pose}
Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a hand controller (e.g., Oculus Touch or Vive).

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints for hand animation.) If you are using the Leap Motion, the return value's valid property will be false and any pose values returned will not be meaningful.

Returns:
Type: Pose
Example

Report the pose of your avatar's right hand.

print(JSON.stringify(MyAvatar.getRightHandPose()));
getRightHandPosition() → {Vec3}
Get the position of the avatar's right hand as positioned by a hand controller (e.g., Oculus Touch or Vive).

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints for hand animation.)

Returns:
The position of the right hand in avatar coordinates if positioned by a hand controller, otherwise Vec3.ZERO.
Type: Vec3
Example

Report the position of your right hand relative to your avatar.

print(JSON.stringify(MyAvatar.getLeftHandPosition()));
getRightHandTipPose() → {Pose}
Returns:
Type: Pose
getRightHandTipPosition() → {Vec3}
Returns:
Type: Vec3
getRightPalmPosition() → {Vec3}
Get the position of the right palm in world coordinates.
Returns:
The position of the right palm in world coordinates.
Type: Vec3
Example

Report the position of your avatar's right palm.

print(JSON.stringify(MyAvatar.getRightPalmPosition()));
getRightPalmRotation() → {Vec3}
Get the rotation of the right palm in world coordinates.
Returns:
The rotation of the right palm in world coordinates.
Type: Vec3
Example

Report the rotation of your avatar's right palm.

print(JSON.stringify(MyAvatar.getRightPalmRotation()));
getSensorToWorldMatrix() → {Mat4}
Returns:
Type: Mat4
getSensorToWorldScale() → {number}
Returns:
Type: number
getSimulationRate(rateNameopt) → {number}
Parameters:
Name Type Attributes Default Description
rateName string <optional>
""
Returns:
Type: number
getSkeleton() → {Array.<MyAvatar.SkeletonJoint>}
Returns an array of joints, where each joint is an object containing name, index, and parentIndex fields.
Returns:
A list of information about each joint in this avatar's skeleton.
Type: Array.< MyAvatar.SkeletonJoint>
getSkeletonOffset() → {Vec3}
Get the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, with an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly.
Returns:
The current skeleton offset.
Type: Vec3
Example

Report your avatar's current skeleton offset.

print(JSON.stringify(MyAvatar.getSkeletonOffset());
getSnapTurn() → {boolean}
Returns:
Type: boolean
getTargetAvatar() → {AvatarData}
Returns:
Type: AvatarData
getTargetAvatarPosition() → {Vec3}
Returns:
The position of the avatar you're currently looking at.
Type: Vec3
Example

Report the position of the avatar you're currently looking at.

print(JSON.stringify(MyAvatar.getTargetAvatarPosition()));
getTargetScale() → {number}
Returns:
Type: number
getThrust() → {vec3}
Returns:
Type: vec3
getUpdateRate(rateNameopt) → {number}
Parameters:
Name Type Attributes Default Description
rateName string <optional>
""
Returns:
Type: number
goToLocation(position, hasOrientationopt, orientationopt, shouldFaceLocationopt)
Move the avatar to a new position and/or orientation in the domain.
Parameters:
Name Type Attributes Default Description
position Vec3 The new position for the avatar, in world coordinates.
hasOrientation boolean <optional>
false Set to true to set the orientation of the avatar.
orientation Quat <optional>
Quat.IDENTITY The new orientation for the avatar.
shouldFaceLocation boolean <optional>
false Set to true to position the avatar a short distance away from the new position and orientate the avatar to face the position.
goToLocation(properties)
Parameters:
Name Type Description
properties object
goToLocationAndEnableCollisions(position)
Parameters:
Name Type Description
position Vec3
increaseSize()
Increase the avatar's scale by five percent, up to a minimum scale of 1000.
Example

Reset your avatar's size to default then grow it 5 times.

MyAvatar.resetSize();

for (var i = 0; i < 5; i++){
   print ("Growing by 5 percent");
   MyAvatar.increaseSize();
}
isDown(direction) → {boolean}
Parameters:
Name Type Description
direction Vec3
Returns:
Type: boolean
isDriveKeyDisabled(key) → {boolean}
Parameters:
Name Type Description
key DriveKeys
Returns:
Type: boolean
isFlying() → {boolean}
Returns:
Type: boolean
isInAir() → {boolean}
Returns:
Type: boolean
isJointDataValid(index) → {boolean}
Parameters:
Name Type Description
index number
Returns:
Type: boolean
isJointDataValid(name) → {boolean}
Parameters:
Name Type Description
name string
Returns:
Type: boolean
isUp(direction) → {boolean}
Parameters:
Name Type Description
direction Vec3
Returns:
Type: boolean
jointToWorldDirection(direction, jointIndexopt) → {Vec3}
Parameters:
Name Type Attributes Default Description
direction Vec3
jointIndex number <optional>
-1
Returns:
Type: Vec3
jointToWorldPoint(position, jointIndexopt) → {Vec3}
Parameters:
Name Type Attributes Default Description
position vec3
jointIndex number <optional>
-1
Returns:
Type: Vec3
jointToWorldRotation(rotation, jointIndexopt) → {Quat}
Parameters:
Name Type Attributes Default Description
rotation Quat
jointIndex number <optional>
-1
Returns:
Type: Quat
overrideAnimation(url, fps, loop, firstFrame, lastFrame)
The avatar animation system includes a set of default animations along with rules for how those animations are blended together with procedural data (such as look at vectors, hand sensors etc.). overrideAnimation() is used to completely override all motion from the default animation system (including inverse kinematics for hand and head controllers) and play a set of specified animations. To end these animations and restore the default animations, use MyAvatar.restoreAnimation.

Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target rig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different, the avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see Avatar Standards.

Parameters:
Name Type Description
url string The URL to the animation file. Animation files need to be .FBX format, but only need to contain the avatar skeleton and animation data.
fps number The frames per second (FPS) rate for the animation playback. 30 FPS is normal speed.
loop boolean Set to true if the animation should loop.
firstFrame number The frame the animation should start at.
lastFrame number The frame the animation should end at.
Example

Play a clapping animation on your avatar for three seconds.

// Clap your hands for 3 seconds then restore animation back to the avatar.
var ANIM_URL = "https://s3.amazonaws.com/hifi-public/animations/ClapAnimations/ClapHands_Standing.fbx";
MyAvatar.overrideAnimation(ANIM_URL, 30, true, 0, 53);
Script.setTimeout(function () {
   MyAvatar.restoreAnimation();
}, 3000);
overrideRoleAnimation(role, url, fps, loop, firstFrame, lastFrame)
Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions that the avatar can perform, such as "idleStand", "idleTalk", or "walkFwd". To get the full list of roles, use getAnimationRoles(). For each role, the avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended together with procedural data (such as look at vectors, hand sensors etc.). overrideRoleAnimation() is used to change the animation clip (.FBX) associated with a specified animation role. To end the animations and restore the default animations, use MyAvatar.restoreRoleAnimation.

Note: Hand roles only affect the hand. Other 'main' roles, like 'idleStand', 'idleTalk', 'takeoffStand' are full body.

Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target rig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different, the avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see Avatar Standards.

Parameters:
Name Type Description
role string The animation role to override
url string The URL to the animation file. Animation files need to be .FBX format, but only need to contain the avatar skeleton and animation data.
fps number The frames per second (FPS) rate for the animation playback. 30 FPS is normal speed.
loop boolean Set to true if the animation should loop
firstFrame number The frame the animation should start at
lastFrame number The frame the animation should end at
Example

The default avatar-animation.json defines an "idleStand" animation role. This role specifies that when the avatar is not moving, an animation clip of the avatar idling with hands hanging at its side will be used. It also specifies that when the avatar moves, the animation will smoothly blend to the walking animation used by the "walkFwd" animation role. In this example, the "idleStand" role animation clip has been replaced with a clapping animation clip. Now instead of standing with its arms hanging at its sides when it is not moving, the avatar will stand and clap its hands. Note that just as it did before, as soon as the avatar starts to move, the animation will smoothly blend into the walk animation used by the "walkFwd" animation role.

// An animation of the avatar clapping its hands while standing. Restore default after 30s.
var ANIM_URL = "https://s3.amazonaws.com/hifi-public/animations/ClapAnimations/ClapHands_Standing.fbx";
MyAvatar.overrideRoleAnimation("idleStand", ANIM_URL, 30, true, 0, 53);
Script.setTimeout(function () {
   MyAvatar.restoreRoleAnimation();
}, 30000);
pinJoint(index, position, orientation) → {boolean}
Parameters:
Name Type Description
index number
position Vec3
orientation Quat
Returns:
Type: boolean
removeAnimationStateHandler(handler)
Parameters:
Name Type Description
handler number
resetLastSent()
resetSensorsAndBody()
resetSize()
Reset the avatar's scale back to the default scale of 1.0.
restoreAnimation()
The avatar animation system includes a set of default animations along with rules for how those animations are blended together with procedural data (such as look at vectors, hand sensors etc.). Playing your own custom animations will override the default animations. restoreAnimation() is used to restore all motion from the default animation system including inverse kinematics for hand and head controllers. If you aren't currently playing an override animation, this function will have no effect.
Example

Play a clapping animation on your avatar for three seconds.

// Clap your hands for 3 seconds then restore animation back to the avatar.
var ANIM_URL = "https://s3.amazonaws.com/hifi-public/animations/ClapAnimations/ClapHands_Standing.fbx";
MyAvatar.overrideAnimation(ANIM_URL, 30, true, 0, 53);
Script.setTimeout(function () {
   MyAvatar.restoreAnimation();
}, 3000);
restoreRoleAnimation(role)
Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions that the avatar can perform, such as "idleStand", "idleTalk", or "walkFwd". To get the full list of roles, use getAnimationRoles(). For each role, the avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended together with procedural data (such as look at vectors, hand sensors etc.). You can change the animation clip (.FBX) associated with a specified animation role using overrideRoleAnimation(). restoreRoleAnimation() is used to restore a specified animation role's default animation clip. If you have not specified an override animation for the specified role, this function will have no effect.
Parameters:
Name Type Description
role string The animation role clip to restore.
restrictScaleFromDomainSettings(domainSettingsObject)
Parameters:
Name Type Description
domainSettingsObject objecct
safeLanding(position) → {boolean}
Parameters:
Name Type Description
position Vec3
Returns:
Type: boolean
sendAvatarDataPacket(sendAllopt)
Parameters:
Name Type Attributes Default Description
sendAll boolean <optional>
false
sendIdentityPacket()
setAbsoluteJointRotationInObjectFrame(index, rotation) → {boolean}
Parameters:
Name Type Description
index number
rotation Quat
Returns:
Type: boolean
setAbsoluteJointTranslationInObjectFrame(index, translation) → {boolean}
Parameters:
Name Type Description
index number
translation Vec3
Returns:
Type: boolean
setAnimGraphOverrideUrl(url)
Parameters:
Name Type Description
url string
setAnimGraphUrl(url)
Parameters:
Name Type Description
url string
setAttachmentData(attachmentData)
Set all models currently attached to your avatar. For example, if you retrieve attachment data using MyAvatar.getAttachmentData or Avatar.getAttachmentData, make changes to it, and then want to update your avatar's attachments per the changed data. You can also remove all attachments by using setting attachmentData to null.
Parameters:
Name Type Description
attachmentData Array.<AttachmentData> The attachment data defining the models to have attached to your avatar. Use null to remove all attachments.
Example

Remove a hat attachment if your avatar is wearing it.

var hatURL = "https://s3.amazonaws.com/hifi-public/tony/cowboy-hat.fbx";
var attachments = MyAvatar.getAttachmentData();

for (var i = 0; i < attachments.length; i++) {
   if (attachments[i].modelURL === hatURL) {
       attachments.splice(i, 1);
       MyAvatar.setAttachmentData(attachments);
       break;
   }
}
setAttachmentsVariant(variant)
Parameters:
Name Type Description
variant object
setAvatarEntityData(avatarEntityData)
Parameters:
Name Type Description
avatarEntityData object
setAvatarScale(scale)
Parameters:
Name Type Description
scale number
setBlendshape(name, value)
Parameters:
Name Type Description
name string
value number
setCharacterControllerEnabled(enabled)
Parameters:
Name Type Description
enabled boolean
Deprecated:
  • Yes
setClearOverlayWhenMoving() → {boolean}
Returns:
Type: boolean
setCollisionsEnabled(enabled)
Parameters:
Name Type Description
enabled boolean
setDominantHand(hand)
Parameters:
Name Type Description
hand string
setEnableDebugDrawAnimPose(enabled)
Parameters:
Name Type Description
enabled boolean
setEnableDebugDrawDefaultPose(enabled)
Parameters:
Name Type Description
enabled boolean
setEnableDebugDrawDetailedCollision(enabled)
Parameters:
Name Type Description
enabled boolean
setEnableDebugDrawHandControllers(enabled)
Parameters:
Name Type Description
enabled boolean
setEnableDebugDrawIKChains(enabled)
Parameters:
Name Type Description
enabled boolean
setEnableDebugDrawIKConstraints(enabled)
Parameters:
Name Type Description
enabled boolean
setEnableDebugDrawIKTargets(enabled)
Parameters:
Name Type Description
enabled boolean
setEnableDebugDrawPosition(enabled)
Parameters:
Name Type Description
enabled boolean
setEnableDebugDrawSensorToWorldMatrix(enabled)
Parameters:
Name Type Description
enabled boolean
setEnableInverseKinematics(enabled)
Parameters:
Name Type Description
enabled boolean
setEnableMeshVisible(visible)
Set whether or not your avatar mesh is visible.
Parameters:
Name Type Description
visible boolean true to set your avatar mesh visible; false to set it invisible.
Example

Make your avatar invisible for 10s.

MyAvatar.setEnableMeshVisible(false);
Script.setTimeout(function () {
   MyAvatar.setEnableMeshVisible(true);
}, 10000);
setFlyingEnabled(enabled)
Parameters:
Name Type Description
enabled boolean
setForceFaceTrackerConnected(connected)
Parameters:
Name Type Description
connected boolean
setGravity(gravity)
Parameters:
Name Type Description
gravity number
setHandState(state)
Parameters:
Name Type Description
state string
setHMDLeanRecenterEnabled(enabled)
Parameters:
Name Type Description
enabled boolean
setJointData(index, rotation, translation)
Set a specific joint's rotation and position relative to its parent.

Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

Parameters:
Name Type Description
index number The index of the joint.
rotation Quat The rotation of the joint relative to its parent.
translation Vec3 The translation of the joint relative to its parent.
Example

Set your avatar to it's default T-pose for a while.
Avatar in T-pose

// Set all joint translations and rotations to defaults.
var i, length, rotation, translation;
for (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {
   rotation = MyAvatar.getDefaultJointRotation(i);
   translation = MyAvatar.getDefaultJointTranslation(i);
   MyAvatar.setJointData(i, rotation, translation);
}

// Restore your avatar's motion after 5s.
Script.setTimeout(function () {
   MyAvatar.clearJointsData();
}, 5000);
setJointData(name, rotation, translation)
Set a specific joint's rotation and position relative to its parent.

Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

Parameters:
Name Type Description
name string The name of the joint.
rotation Quat The rotation of the joint relative to its parent.
translation Vec3 The translation of the joint relative to its parent.
setJointMappingsFromNetworkReply()
setJointRotation(name, rotation)
Set a specific joint's rotation relative to its parent.

Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

Parameters:
Name Type Description
name string The name of the joint.
rotation Quat The rotation of the joint relative to its parent.
Example

Set your avatar to its default T-pose then rotate its right arm.
Avatar in T-pose with arm rotated

// Set all joint translations and rotations to defaults.
var i, length, rotation, translation;
for (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {
   rotation = MyAvatar.getDefaultJointRotation(i);
   translation = MyAvatar.getDefaultJointTranslation(i);
   MyAvatar.setJointData(i, rotation, translation);
}

// Rotate the right arm.
var newArmRotation = { x: 0.47, y: 0.22, z: -0.02, w: 0.87 };
MyAvatar.setJointRotation("RightArm", newArmRotation);

// Restore your avatar's motion after 5s.
Script.setTimeout(function () {
   MyAvatar.clearJointsData();
}, 5000);
setJointRotation(index, rotation)
Set a specific joint's rotation relative to its parent.

Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

Parameters:
Name Type Description
index number The index of the joint.
rotation Quat The rotation of the joint relative to its parent.
setJointRotations(jointRotations)
Set the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint.

Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

Parameters:
Name Type Description
jointRotations Array.<Quat> The rotations for all joints in the avatar. The values are in the same order as the array returned by MyAvatar.getJointNames or Avatar.getJointNames.
Example

Set your avatar to its default T-pose then rotate its right arm.
Avatar in T-pose

// Set all joint translations and rotations to defaults.
var i, length, rotation, translation;
for (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {
   rotation = MyAvatar.getDefaultJointRotation(i);
   translation = MyAvatar.getDefaultJointTranslation(i);
   MyAvatar.setJointData(i, rotation, translation);
}

// Get all join rotations.
var jointRotations = MyAvatar.getJointRotations(); 

// Update the rotation of the right arm in the array.
jointRotations[MyAvatar.getJointIndex("RightArm")] = { x: 0.47, y: 0.22, z: -0.02, w: 0.87 };

// Update all joint rotations.
MyAvatar.setJointRotations(jointRotations);

// Restore your avatar's motion after 5s.
Script.setTimeout(function () {
   MyAvatar.clearJointsData();
}, 5000);
setJointTranslation(name, translation)
Set a specific joint's translation relative to its parent.

Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

Parameters:
Name Type Description
name string The name of the joint.
translation Vec3 The translation of the joint relative to its parent.
Example

Stretch your avatar's neck. Depending on the avatar you are using, you will either see a gap between the head and body or you will see the neck stretched.
Avatar with neck stretched

// Stretch your avatar's neck.
MyAvatar.setJointTranslation("Neck", { x: 0, y: 25, z: 0 });

// Restore your avatar's neck after 5s.
Script.setTimeout(function () {
   MyAvatar.clearJointData("Neck");
}, 5000);
setJointTranslation(index, translation)
Set a specific joint's translation relative to its parent.

Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

Parameters:
Name Type Description
index number The index of the joint.
translation Vec3 The translation of the joint relative to its parent.
setJointTranslations(translations)
Parameters:
Name Type Description
translations Array.<Vec3>
setModelScale(scale)
Parameters:
Name Type Description
scale number
setOrientationVar(newOrientationVar)
Parameters:
Name Type Description
newOrientationVar object
setParentID(parentID)
Parameters:
Name Type Description
parentID Uuid
setParentJointIndex(parentJointIndex)
Parameters:
Name Type Description
parentJointIndex number
setRawJointData(data)
Parameters:
Name Type Description
data Array.<JointData>
setSessionUUID(sessionUUID)
Parameters:
Name Type Description
sessionUUID Uuid
setSkeletonOffset(offset)
Set the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, with an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly.
Parameters:
Name Type Description
offset Vec3 The skeleton offset to set.
Example

Raise your avatar off the ground a little.

// Raise your avatar off the ground a little.
MyAvatar.setSkeletonOffset({ x: 0, y: 0.1: z: 0 });

// Restore its offset after 5s.
Script.setTimeout(function () {
   MyAvatar.setSkeletonOffset(Vec3.ZERO);
}, 5000);
setSnapTurn(on)
Parameters:
Name Type Description
on boolean
setThrust(thrust)
Parameters:
Name Type Description
thrust Vec3
triggerRotationRecenter()
Recenter the avatar's rotation, if MyAvatar.hmdLeanRecenterEnabled is false.
triggerVerticalRecenter()
Recenter the avatar in the vertical direction, if MyAvatar.hmdLeanRecenterEnabled is false.
updateAvatarEntity(entityID, entityData)
Parameters:
Name Type Description
entityID Uuid
entityData string
updateMotionBehaviorFromMenu()
useFullAvatarURL(fullAvatarURL, modelNameopt)
Parameters:
Name Type Attributes Default Description
fullAvatarURL string
modelName string <optional>
""
worldToJointDirection(direction, jointIndexopt) → {Vec3}
Parameters:
Name Type Attributes Default Description
direction Vec3
jointIndex number <optional>
-1
Returns:
Type: Vec3
worldToJointPoint(position, jointIndexopt) → {Vec3}
Parameters:
Name Type Attributes Default Description
position Vec3
jointIndex number <optional>
-1
Returns:
Type: Vec3
worldToJointRotation(rotation, jointIndexopt) → {Quat}
Parameters:
Name Type Attributes Default Description
rotation Quat
jointIndex number <optional>
-1
Returns:
Type: Quat

Signals

attachmentsChanged() → {Signal}
Returns:
Type: Signal
audioListenerModeChanged() → {Signal}
Returns:
Type: Signal
collisionWithEntity(collision) → {Signal}
Triggered when the avatar collides with an entity.
Parameters:
Name Type Description
collision Collision
Returns:
Type: Signal
Example

Report each time your avatar collides with an entity.

MyAvatar.collisionWithEntity.connect(function (collision) {
   print("Your avatar collided with an entity.");
});
displayNameChanged() → {Signal}
Returns:
Type: Signal
dominantHandChanged(hand) → {Signal}
Parameters:
Name Type Description
hand string
Returns:
Type: Signal
energyChanged(energy) → {Signal}
Parameters:
Name Type Description
energy number
Returns:
Type: Signal
lookAtSnappingChanged(enabled) → {Signal}
Parameters:
Name Type Description
enabled boolean
Returns:
Type: Signal
newCollisionSoundURL(url) → {Signal}
Parameters:
Name Type Description
url string
Returns:
Type: Signal
onLoadComplete() → {Signal}
Returns:
Type: Signal
positionGoneTo() → {Signal}
Returns:
Type: Signal
rigReady() → {Signal}
Returns:
Type: Signal
rigReset() → {Signal}
Returns:
Type: Signal
scaleChanged() → {Signal}
Returns:
Type: Signal
sensorToWorldScaleChanged(scale) → {Signal}
Parameters:
Name Type Description
scale number
Returns:
Type: Signal
sessionDisplayNameChanged() → {Signal}
Returns:
Type: Signal
sessionUUIDChanged() → {Signal}
Returns:
Type: Signal
skeletonChanged() → {Signal}
Returns:
Type: Signal
skeletonModelURLChanged() → {Signal}
Returns:
Type: Signal
transformChanged() → {Signal}
Returns:
Type: Signal
wentActive() → {Signal}
Returns:
Type: Signal
wentAway() → {Signal}
Returns:
Type: Signal

Type Definitions

SkeletonJoint
Information about a single joint in an Avatar's skeleton hierarchy.
Type: object
Properties:
Name Type Description
name string Joint name.
index number Joint index.
parentIndex number Index of this joint's parent (-1 if no parent).