VRC Spatial Audio Source Spatialization is Broken (Worlds)
tracked
Ames~
When Enable Spatialization is ticked, if a player causes an audiosource to call audiosource.play() and then moves out of the range of the audiosource and the audiosource is played again, the player will hear the audio for a split second. The audio will then "move" towards its actual location with each successive play of the audiosource until it cannot be heard, as intended.
To reproduce this:
- create an audio source and add an audioClip in unity, add the vrc spatial audio source component
- check "Enable Spatialization"
- Set Spatial Blend to 3D ( and ensure its not global, eg. a custom rolloff)
- Add a script that will play the audio source such as:
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class audiotester : UdonSharpBehaviour
{
[SerializeField] private AudioSource audioSource
private void Update()
{
if (Input.GetKeyDown(KeyCode.F)) audioSource.Play();
}
}
- Wire up the audio source game object with a game object that contains the script in the inspector
- Put the audiosource game object at 0,0,0 position
- Publish the World
- In the world in vrchat press "F" once to hear the audio
- Move out of range of the audio source
- Press "F" again
- The start of the audiosource will play at volume for a second, and be heard outside of its defined range
Log In
A
updated the status to
tracked