AvatarManager

Available in: Interface Scripts Client Entity Scripts

The AvatarManager API has properties and methods which manage Avatars within the same domain.

Note: This API is also provided to Interface and client entity scripts as the synonym, AvatarList. For assignment client scripts, see the separate AvatarList API.

Methods

Signals

Methods

findParabolaIntersectionVector(pick, avatarsToInclude, avatarsToDiscard) → {ParabolaToAvatarIntersectionResult}
Parameters:
Name Type Description
pick PickParabola
avatarsToInclude Array.<Uuid>
avatarsToDiscard Array.<Uuid>
Returns:
Type: ParabolaToAvatarIntersectionResult
findRayIntersection(ray, avatarsToIncludeopt, avatarsToDiscardopt) → {RayToAvatarIntersectionResult}
Parameters:
Name Type Attributes Default Description
ray PickRay
avatarsToInclude Array.<Uuid> <optional>
[]
avatarsToDiscard Array.<Uuid> <optional>
[]
Returns:
Type: RayToAvatarIntersectionResult
findRayIntersectionVector(ray, avatarsToInclude, avatarsToDiscard) → {RayToAvatarIntersectionResult}
Parameters:
Name Type Description
ray PickRay
avatarsToInclude Array.<Uuid>
avatarsToDiscard Array.<Uuid>
Returns:
Type: RayToAvatarIntersectionResult
getAvatar(avatarID) → {AvatarData}
Parameters:
Name Type Description
avatarID Uuid
Returns:
Type: AvatarData
getAvatarDataRate(sessionID, rateNameopt) → {number}
Parameters:
Name Type Attributes Default Description
sessionID Uuid
rateName string <optional>
""
Returns:
Type: number
getAvatarIdentifiers() → {Array.<Uuid>}
Returns:
Type: Array.< Uuid>
getAvatarSimulationRate(sessionID, rateNameopt) → {number}
Parameters:
Name Type Attributes Default Description
sessionID Uuid
rateName string <optional>
""
Returns:
Type: number
getAvatarsInRange(position, range) → {Array.<Uuid>}
Parameters:
Name Type Description
position Vec3
range number
Returns:
Type: Array.< Uuid>
getAvatarSortCoefficient(name) → {number}
Parameters:
Name Type Description
name string
Returns:
Type: number
getAvatarUpdateRate(sessionID, rateNameopt) → {number}
Parameters:
Name Type Attributes Default Description
sessionID Uuid
rateName string <optional>
""
Returns:
Type: number
getPalData(specificAvatarIdentifiersopt) → {object}
Used in the PAL for getting PAL-related data about avatars nearby. Using this method is faster than iterating over each avatar and obtaining data about them in JavaScript, as that method locks and unlocks each avatar's data structure potentially hundreds of times per update tick.
Parameters:
Name Type Attributes Description
specificAvatarIdentifiers Array.<string> <optional>
A list of specific Avatar Identifiers about which you want to get PAL data
Returns:
Type: object
isAvatarInRange(position, range) → {boolean}
Parameters:
Name Type Description
position string
range string
Returns:
Type: boolean
processAvatarDataPacket(message, sendingNode)
Parameters:
Name Type Description
message
sendingNode
processAvatarIdentityPacket(message, sendingNode)
Parameters:
Name Type Description
message
sendingNode
processBulkAvatarTraits(message, sendingNode)
Parameters:
Name Type Description
message
sendingNode
processKillAvatar(message, sendingNode)
Parameters:
Name Type Description
message
sendingNode
sessionUUIDChanged(sessionUUID, oldSessionUUID)
Parameters:
Name Type Description
sessionUUID Uuid
oldSessionUUID Uuid
setAvatarSortCoefficient(name, value)
Parameters:
Name Type Description
name string
value number
updateAvatarRenderStatus(shouldRenderAvatars)
Parameters:
Name Type Description
shouldRenderAvatars boolean

Signals

avatarAddedEvent(sessionUUID) → {Signal}
Parameters:
Name Type Description
sessionUUID Uuid
Returns:
Type: Signal
avatarRemovedEvent(sessionUUID) → {Signal}
Parameters:
Name Type Description
sessionUUID Uuid
Returns:
Type: Signal
avatarSessionChangedEvent(sessionUUID, oldSessionUUID) → {Signal}
Parameters:
Name Type Description
sessionUUID Uuid
oldSessionUUID Uuid
Returns:
Type: Signal