AvatarInputs

Description

Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts

The AvatarInputs API provides facilities to manage user inputs.

Properties

Name Type Summary
cameraEnabled boolean

true if webcam face tracking is enabled, false if it is disabled. Read-only.

Deprecated: This property is deprecated and has been removed.

cameraMuted boolean

true if webcam face tracking is muted (temporarily disabled), false it if isn't. Read-only.

Deprecated: This property is deprecated and has been removed.

ignoreRadiusEnabled boolean

true if the privacy shield is enabled, false if it is disabled. Read-only.

isHMD boolean

true if the display mode is HMD, false if it isn't. Read-only.

showAudioTools boolean

true if the microphone mute button and audio level meter are shown, false if they are hidden.

showBubbleTools boolean

true if the privacy shield UI button is shown, false if it is hidden.

Methods

Name Return Value Summary
loudnessToAudioLevel number

Converts non-linear audio loudness to a linear audio level.

resetSensors None

Resets sensors, audio, avatar animations, and the avatar rig.

setShowAudioTools None

Sets whether or not the microphone mute button and audio level meter is shown.

setShowBubbleTools None

Sets whether or not the privacy shield button is shown.

toggleCameraMute None

Toggles the muting (temporary disablement) of webcam face tracking on/off.

Deprecated: This function is deprecated and has been removed.

Signals

Name Summary
avatarEnteredIgnoreRadius

Triggered when another user enters the privacy shield.

avatarLeftIgnoreRadius

Triggered when another user leaves the privacy shield.

Note: Currently doesn't work.

Deprecated: This signal is deprecated and will be removed.

cameraEnabledChanged

Triggered when webcam face tracking is enabled or disabled.

Deprecated: This signal is deprecated and has been removed.

cameraMutedChanged

Triggered when webcam face tracking is muted (temporarily disabled) or unmuted.

Deprecated: This signal is deprecated and has been removed.

enteredIgnoreRadiusChanged

Triggered when another user enters the privacy shield.

ignoreRadiusEnabledChanged

Triggered when the privacy shield is enabled or disabled.

isHMDChanged

Triggered when the display mode changes between desktop and HMD.

showAudioToolsChanged

Triggered when the visibility of the microphone mute button and audio level meter changes.

showBubbleToolsChanged

Triggered when the visibility of the privacy shield button changes.

Method Details

(static) loudnessToAudioLevel( loudness ) → {number}
Returns: The linear audio level.

Converts non-linear audio loudness to a linear audio level.

Parameters

Name Type Description
loudness number

The non-linear audio loudness.

(static) resetSensors( )

Resets sensors, audio, avatar animations, and the avatar rig.

(static) setShowAudioTools( showAudioTools )

Sets whether or not the microphone mute button and audio level meter is shown.

Parameters

Name Type Description
showAudioTools boolean

true to show the microphone mute button and audio level meter, false to hide it.

(static) setShowBubbleTools( showBubbleTools )

Sets whether or not the privacy shield button is shown.

Parameters

Name Type Description
showBubbleTools boolean

true to show the privacy shield button, false to hide it.

(static) toggleCameraMute( )

Toggles the muting (temporary disablement) of webcam face tracking on/off.

Deprecated: This function is deprecated and has been removed.

Signal Details

avatarEnteredIgnoreRadius( avatarID )
Returns: Signal

Triggered when another user enters the privacy shield.

Parameters

Name Type Description
avatarID QUuid

The session ID of the user that entered the privacy shield.

Example

Report when a user enters the privacy shield.

AvatarInputs.avatarEnteredIgnoreRadius.connect(function(avatarID) {
    print("User entered the privacy shield: " + avatarID);
};
avatarLeftIgnoreRadius( avatarID )
Returns: Signal

Triggered when another user leaves the privacy shield.

Note: Currently doesn't work.

Deprecated: This signal is deprecated and will be removed.

Parameters

Name Type Description
avatarID QUuid

The session ID of the user that exited the privacy shield.

cameraEnabledChanged( )
Returns: Signal

Triggered when webcam face tracking is enabled or disabled.

Deprecated: This signal is deprecated and has been removed.

cameraMutedChanged( )
Returns: Signal

Triggered when webcam face tracking is muted (temporarily disabled) or unmuted.

Deprecated: This signal is deprecated and has been removed.

enteredIgnoreRadiusChanged( )
Returns: Signal

Triggered when another user enters the privacy shield.

ignoreRadiusEnabledChanged( enabled )
Returns: Signal

Triggered when the privacy shield is enabled or disabled.

Parameters

Name Type Description
enabled boolean

true if the privacy shield is enabled, false if it is disabled.

isHMDChanged( )
Returns: Signal

Triggered when the display mode changes between desktop and HMD.

showAudioToolsChanged( show )
Returns: Signal

Triggered when the visibility of the microphone mute button and audio level meter changes.

Parameters

Name Type Description
show boolean

true if the microphone mute button and audio level meter are shown, false if they are is hidden.

showBubbleToolsChanged( show )
Returns: Signal

Triggered when the visibility of the privacy shield button changes.

Parameters

Name Type Description
show boolean

true if the privacy shield UI button is shown, false if it is hidden.