Function attachSpatialTarget
-
attachSpatialTarget(
target: AudioEngine | AudioGraphHost,
worldTarget: SpatialTarget,
type?: SpatialAttachmentType,
): voidParameters
- target: AudioEngine | AudioGraphHost
A
StaticSound,AudioBus, or theAudioEngine(listener). - worldTarget: SpatialTarget
The transform to follow.
Optionaltype: SpatialAttachmentTypeWhich transform components to follow. Defaults to
"positionAndRotation".
Returns void
- target: AudioEngine | AudioGraphHost
Attaches a spatial sound/bus — or the engine's listener — to a world transform. The position/rotation follow the target on each updateSpatialAudio (or auto-update) tick.