SoundTransform3D is a convenience class that helps adjust a Soundtransform's volume and pan according position and distance of a listener and emitter object. See SimplePanVolumeDriver for the limitations of this method.

Constructor

@:value({ scale : 1000, volume : 1, listener : null, emitter : null })new(?emitter:ObjectContainer3D, ?listener:ObjectContainer3D, volume:Float = 1, scale:Float = 1000)

Creates a new SoundTransform3D.

Parameters:

emitter

the ObjectContainer3D from which the sound originates.

listener

the ObjectContainer3D considered to be to position of the listener (usually, the camera)

volume

the maximum volume used.

scale

the distance that the sound covers.

Variables

Methods

update():Void

updates the SoundTransform based on the emitter and listener.

updateFromVector3D(v:Vector3D):Void

udpates the SoundTransform based on the vector representing the distance and angle between the emitter and listener.

Parameters:

v

Vector3D