Api > AudioSource > PlayClipAtPoint()
AudioSource.PlayClipAtPoint(AudioClip clip, Vector3 position, number volume = 1.0)⚓︎
Plays an AudioClip at a given position in world space.
Parameters:⚓︎
Name | Type | Description |
---|---|---|
clip | AudioClip | Audio data to play. |
position | Vector3 | Position in world space from which sound originates. |
volume | number | Playback volume. |
Usage⚓︎
---@type AudioClip
local clip;
---@type Vector3
local position;
---@type number
local volume;
AudioSource:PlayClipAtPoint(clip, position, volume)
Extra Detail⚓︎
This function creates an audio source but automatically disposes of it once the clip has finished playing.