ParelVRDocs
Player site

Creators / Worlds

3D audio

Sound that behaves like the real thing. Walls muffle it, it clears as you step round a corner, and rooms echo. Two components, no code.

Both components play through the headset's 3D audio, like players' voices. Rays from each player to the sound find the walls, floors and props in between, which muffle the sound and turn it down. Far sounds lose their highs. Rays around the sound measure the room, so closed rooms echo, big ones echo longer, and outdoors stays dry.

One sound: Single Object#

For a radio, a fire, a speaker, a fountain. Put Add Component > ParelVR > World SDK > 3D Audio Raycast Single Object next to the AudioSource. The object's own colliders never block it.

An area: Zone#

For a river, a waterfall, rain on a roof, the hum of a room. Add 3D Audio Raycast Zone and give it a shape: a box, a sphere, or the colliders on it and its children (use triggers; several boxes make a long river).

  • Outside the zone, the sound comes from the zone's nearest point to you, so a river runs along beside you and a room's hum comes out of its doorway.
  • Inside it, the sound is all around you.

Adding the zone makes a child Zone Sound with the AudioSource for your clip. Every other sound inside the zone gets 3D Audio Raycast too, including ones that spawn or move in later.

Fine tuning#

  • 3D Audio Raycast Material says what a wall, floor or prop is made of: Concrete, Brick, Stone, Wood, Glass, Metal, Plaster, Tile, Carpet, Fabric, Foliage, Water, Grate, or your own numbers. Brick lets almost nothing through, curtains and bushes most of it, and a carpeted room echoes less than a tiled one. Without one, it guesses from the collider's physics material, the object's material and its name.
  • 3D Audio Raycast Ignore keeps the sounds on an object exactly as you made them, even inside a zone: background music, a 2D announcer.
  • On each component you set what blocks the sound, how much quieter and how muffled it gets behind a wall, how fast it changes, and the echo.

The AudioSource's own Min / Max Distance still decide how it fades with distance, and World Menu sliders and scripts can still change its volume.