diff --git a/AVVR/Assets/_Scripts/MenuInterface/BuildRoom.cs b/AVVR/Assets/_Scripts/MenuInterface/BuildRoom.cs index 8099107970ab2cfa504a3da30bd6331781d652dc..ae37c88bf7f0bd8bbb35647674ff5fe755694624 100644 --- a/AVVR/Assets/_Scripts/MenuInterface/BuildRoom.cs +++ b/AVVR/Assets/_Scripts/MenuInterface/BuildRoom.cs @@ -83,6 +83,13 @@ public class BuildRoom : MonoBehaviour { // Instantiate the speaker prefab GameObject speaker = Instantiate(interactableAudioSourcePrefab, new Vector3(x, y, z), Quaternion.identity); + // Ensure the speaker stays in place + Rigidbody rb = speaker.GetComponent<Rigidbody>(); + if (rb != null) + { + rb.isKinematic = true; + } + // Set the audio clip for the speaker AudioSource audioSource = speaker.GetComponent<AudioSource>(); audioSource.clip = Resources.Load<AudioClip>(audioPath);