Skip to main content

setDistance

Sets the global voicechat distance.

note

Only has an effect if VoicechatModeType is proximity.

PERSISTENT METHOD

This method is persistent. It will not reset when a server restarts.

Syntax​

engine.voicechat.setDistance(distance);

Parameters​

NameTypeDescription
distancenumberThe distance in meters that voicechat should be audible. Max distance is 1024.

Returns​

  • Promise<void> - A promise that resolves when the distance has been set.

Example​

engine.voicechat.setDistance(128);

Available on: Client Server