Description
Supported Script Types: Assignment Client Scripts
TheAgent API enables an assignment client to emulate an avatar. Setting isAvatar = true connects
the assignment client to the avatar and audio mixers, and enables the Avatar API to be used.Properties
| Name | Type | Summary |
|---|---|---|
| isAvatar | boolean |
|
| isPlayingAvatarSound | boolean |
|
| isListeningToAudioStream | boolean |
|
| isNoiseGateEnabled | boolean |
|
| lastReceivedAudioLoudness | number |
The current loudness of the audio input. Nominal range [ |
| sessionUUID | Uuid |
The unique ID associated with the agent's current session in the domain. Read-only. |
Methods
| Name | Return Value | Summary |
|---|---|---|
isAvatar
|
boolean |
Checks whether the script is emulating an avatar. |
playAvatarSound
|
None |
Plays a sound from the position and with the orientation of the emulated avatar's head. No sound is played unless
|
setIsAvatar
|
None |
Sets whether the script should emulate an avatar. |
Method Details
|
(static) isAvatar( ) → {boolean}
Returns: true if the script is emulating an avatar, otherwise false.
|
|---|
|
Checks whether the script is emulating an avatar. ExampleCheck whether the agent is emulating an avatar.
|
| (static) playAvatarSound( avatarSound ) | ||||||
|---|---|---|---|---|---|---|
|
Plays a sound from the position and with the orientation of the emulated avatar's head. No sound is played unless
Parameters
ExamplePlay a sound from an emulated avatar.
|
| (static) setIsAvatar( isAvatar ) | ||||||
|---|---|---|---|---|---|---|
|
Sets whether the script should emulate an avatar. Parameters
ExampleMake an assignment client script emulate an avatar.
|