Skip to content

ListenerRadius

Narta Xaymar Dirks edited this page Nov 26, 2026 · 1 revision

ListenerRadius BlitzLLVM

ListenerRadius:Void value:Float32, fade_ms:Int32=0
Parameter Mode Type Default Description
value In Float32 required The radius in units of the world. 0 (the default) is a point, as in the original. Below 0 is a runtime error.
fade_ms In Int32 0 How many milliseconds it takes to get to the new value. 0 (the default) changes it at once. Below 0 is a runtime error.

Description

BlitzLLVM This command does not exist in the original Blitz products. BlitzLLVM adds it.

Makes the listener a ball instead of a point, so that a sound that passes close by moves from one speaker to the other and changes its pitch over a moment instead of all at once. This is a BlitzLLVM extension.

Differences

  • The radius is added to the one of the sound (ChannelRadius). The panning and the doppler speeds then use the direction divided by the square root of distance² + radius² instead of the distance, so they are weaker close by and the same as before far away. The volume does not change with the radius. GetListenerRadius tells the value.

Examples

; The player is a ship of about 4 units across.
ListenerRadius 2

Related Commands

ChannelRadius BlitzLLVM, CreateListener Blitz3D, GetChannelRadius BlitzLLVM, GetListenerRadius BlitzLLVM, ListenerDistance BlitzLLVM, ListenerDoppler BlitzLLVM, ListenerFalloff BlitzLLVM, ListenerRolloff BlitzLLVM

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally