The Audio3DComponent enhances 3D scenes by providing spatial audio capabilities.
Description
The Audio3DComponent
enhances 3D scenes by providing spatial audio capabilities. It uses the AudioStreamPlayer3D
node to manage audio playback within a three-dimensional space.
Usage
- Attach the component to a game entity.
- Utilize the properties to configure audio characteristics like volume, distance, and looping.
Dependencies
Requires the use of the Anitya server for downloading audio as assets.
Audio has to be in mp3, wav or ogg format.
Properties
audio
- Type:
ASSET_REF
- Description: Reference to the audio asset to be played.
distance_audio
- Type:
FLOATING
- Description: Determines the maximum distance at which the audio can be heard.
volume_audio
- Type:
FLOATING
- Description: Controls the volume of the audio.
loop_audio
- Type:
BOOL
- Description: Indicates whether the audio should loop.
visible
- Type:
BOOL
- Description: Controls the visibility of the component in the scene.
autoplay
- Type:
BOOL
- Description: Determines whether the audio starts playing automatically when the scene is loaded.