From ab737e016c62eb93db997d26efa7505cbfac5d35 Mon Sep 17 00:00:00 2001 From: Timur Nizamov Date: Tue, 18 Nov 2025 22:29:02 +0200 Subject: [PATCH] car occlusion, space ambience done --- .../Intercation Logic/Car Driving Routine.cs | 9 +- .../Elevator/Scripts/Elevator outer.cs | 20 + .../Scripts/Floor Button Visualizer.cs | 14 +- .../Prefabs/Scripts/Menu Teleport Button.cs | 27 +- .../NewHandPresence/Prefabs/Scripts/Menu.cs | 8 +- .../NewHandPresence/Prefabs/XR Origin.prefab | 56 +- .../Portals2/Space enter Collider.cs | 19 +- .../_PROJECT/Scenes/DeltaBuilding_base.unity | 4 +- Assets/_PROJECT/Scripts/Audio/FMODEvents.cs | 4 + .../Scripts/Audio/FirstPersonOcclusion.cs | 23 +- .../.cache/buildrecords/Desktop/Master.br | Bin 144 -> 144 bytes .../.cache/buildrecords/Desktop/Music.br | Bin 80 -> 80 bytes .../.cache/buildrecords/Desktop/SFX.br | Bin 76 -> 76 bytes .../.cache/fsbcache/Desktop/024034CF.fobj | Bin 0 -> 971388 bytes .../.cache/fsbcache/Desktop/1C992070.fobj | Bin 0 -> 970844 bytes .../.cache/fsbcache/Desktop/58DFE50C.fobj | Bin 0 -> 746995 bytes ...{55eaea09-18f2-47ac-aeaf-925c372afb16}.pdc | Bin 0 -> 983100 bytes ...{696c9935-594e-405d-b153-12f9ffd1ab9d}.pdc | Bin 0 -> 983100 bytes ...{aa0fd6ae-7de5-4065-8fcb-ffaef68b82a7}.pdc | Bin 0 -> 983100 bytes DeltaVRFMOD/Assets/KosmoseTaust.wav | 3 + DeltaVRFMOD/Assets/KosmoseTaust_layer2.wav | 3 + DeltaVRFMOD/Assets/KosmoseTaust_layer3.wav | 3 + .../Build/Desktop/Desktop/Master.strings.bank | Bin 3694 -> 3790 bytes DeltaVRFMOD/Build/Desktop/Desktop/Music.bank | Bin 548512 -> 3241312 bytes DeltaVRFMOD/Build/Desktop/Desktop/SFX.bank | Bin 2238464 -> 2238464 bytes ...{55eaea09-18f2-47ac-aeaf-925c372afb16}.xml | 23 + ...{696c9935-594e-405d-b153-12f9ffd1ab9d}.xml | 23 + ...{aa0fd6ae-7de5-4065-8fcb-ffaef68b82a7}.xml | 23 + ...{58706c2f-6a9a-4b01-9f11-b2a4c3e89fae}.xml | 550 ++++++++++++++++++ ...{dbd4958a-6ef2-4241-9e49-b786845fdcef}.xml | 2 +- ...{e6f82272-6d55-483f-a1e6-d3bd125a5748}.xml | 3 + ...{e93048b7-c7f8-4c1a-aec8-b1903abab7a8}.xml | 30 + 32 files changed, 812 insertions(+), 35 deletions(-) create mode 100644 DeltaVRFMOD/.cache/fsbcache/Desktop/024034CF.fobj create mode 100644 DeltaVRFMOD/.cache/fsbcache/Desktop/1C992070.fobj create mode 100644 DeltaVRFMOD/.cache/fsbcache/Desktop/58DFE50C.fobj create mode 100644 DeltaVRFMOD/.cache/{55eaea09-18f2-47ac-aeaf-925c372afb16}.pdc create mode 100644 DeltaVRFMOD/.cache/{696c9935-594e-405d-b153-12f9ffd1ab9d}.pdc create mode 100644 DeltaVRFMOD/.cache/{aa0fd6ae-7de5-4065-8fcb-ffaef68b82a7}.pdc create mode 100644 DeltaVRFMOD/Assets/KosmoseTaust.wav create mode 100644 DeltaVRFMOD/Assets/KosmoseTaust_layer2.wav create mode 100644 DeltaVRFMOD/Assets/KosmoseTaust_layer3.wav create mode 100644 DeltaVRFMOD/Metadata/AudioFile/{55eaea09-18f2-47ac-aeaf-925c372afb16}.xml create mode 100644 DeltaVRFMOD/Metadata/AudioFile/{696c9935-594e-405d-b153-12f9ffd1ab9d}.xml create mode 100644 DeltaVRFMOD/Metadata/AudioFile/{aa0fd6ae-7de5-4065-8fcb-ffaef68b82a7}.xml create mode 100644 DeltaVRFMOD/Metadata/Event/{58706c2f-6a9a-4b01-9f11-b2a4c3e89fae}.xml create mode 100644 DeltaVRFMOD/Metadata/ParameterPreset/{e93048b7-c7f8-4c1a-aec8-b1903abab7a8}.xml diff --git a/Assets/_PROJECT/Components/Bolt/Intercation Logic/Car Driving Routine.cs b/Assets/_PROJECT/Components/Bolt/Intercation Logic/Car Driving Routine.cs index 25d92e2a..29d6fdd0 100644 --- a/Assets/_PROJECT/Components/Bolt/Intercation Logic/Car Driving Routine.cs +++ b/Assets/_PROJECT/Components/Bolt/Intercation Logic/Car Driving Routine.cs @@ -27,7 +27,7 @@ public class CarDrivingRoutine : NetworkBehaviour private EventInstance CarMovement; - + private FirstPersonOcclusion occlusion; private void Awake() { @@ -41,6 +41,13 @@ public class CarDrivingRoutine : NetworkBehaviour CarMovement.setParameterByName("EasyBoltLogic", 0); //"Driving - 0 in FMOD" CarMovement.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(gameObject)); //setting 3d attributes + occlusion = GetComponent(); + + if (occlusion != null) + { + occlusion.InitialiseWithInstance(CarMovement); + } + } private void Start() { diff --git a/Assets/_PROJECT/Components/Elevator/Scripts/Elevator outer.cs b/Assets/_PROJECT/Components/Elevator/Scripts/Elevator outer.cs index 6c132de4..27c88b78 100644 --- a/Assets/_PROJECT/Components/Elevator/Scripts/Elevator outer.cs +++ b/Assets/_PROJECT/Components/Elevator/Scripts/Elevator outer.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Unity.XR.CoreUtils; using UnityEngine; +using FMOD.Studio; public class ElevatorOuter : NetworkBehaviour { @@ -25,10 +26,24 @@ public class ElevatorOuter : NetworkBehaviour public ElevatorStatusPlate statusPlate; public AudioSource arrivalBeeper; + private EventInstance arrivalBeep; + private FirstPersonOcclusion occlusion; + private void Start() { doorOpenTime = box.doorOpenTime; doorCloseTime = box.doorCloseTime; + + arrivalBeep = AudioManager.Instance.CreateInstance(FMODEvents.Instance.ElevatorArrival); //initialising the variable + arrivalBeep.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(gameObject)); //setting 3d attributes + + occlusion = GetComponent(); + + if (occlusion != null) + { + occlusion.InitialiseWithInstance(arrivalBeep); + } + } private void OnTriggerEnter(Collider other) { @@ -77,6 +92,11 @@ public class ElevatorOuter : NetworkBehaviour Debug.Log("Outer Doors moved"); } + void Update() + { + arrivalBeep.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(gameObject)); //updating the attributes + } + } diff --git a/Assets/_PROJECT/Components/NewHandPresence/Prefabs/Scripts/Floor Button Visualizer.cs b/Assets/_PROJECT/Components/NewHandPresence/Prefabs/Scripts/Floor Button Visualizer.cs index f8883bfe..aba416e6 100644 --- a/Assets/_PROJECT/Components/NewHandPresence/Prefabs/Scripts/Floor Button Visualizer.cs +++ b/Assets/_PROJECT/Components/NewHandPresence/Prefabs/Scripts/Floor Button Visualizer.cs @@ -23,15 +23,15 @@ public class FloorButtonVisualizer : MonoBehaviour { this.ActiveState = true; buttonImage.sprite = ActiveSprite; - + AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.Hover, gameObject); // --- Only play hover if selection actually changed --- - if (initialized && lastActiveButton != this) - { - AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.Hover, gameObject); - } + //if (initialized && lastActiveButton != this) + //{ + // AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.Hover, gameObject); + //} - lastActiveButton = this; - initialized = true; + //lastActiveButton = this; + //initialized = true; } public void Deactivate() diff --git a/Assets/_PROJECT/Components/NewHandPresence/Prefabs/Scripts/Menu Teleport Button.cs b/Assets/_PROJECT/Components/NewHandPresence/Prefabs/Scripts/Menu Teleport Button.cs index 70273c6b..48863029 100644 --- a/Assets/_PROJECT/Components/NewHandPresence/Prefabs/Scripts/Menu Teleport Button.cs +++ b/Assets/_PROJECT/Components/NewHandPresence/Prefabs/Scripts/Menu Teleport Button.cs @@ -1,13 +1,14 @@ +using FMOD.Studio; +using FMODUnity; using System; using System.Collections; using System.Collections.Generic; using Unity.XR.CoreUtils; using UnityEngine; +using UnityEngine.EventSystems; using UnityEngine.Rendering; using UnityEngine.UI; using UnityEngine.XR.Interaction.Toolkit; -using FMOD.Studio; -using FMODUnity; public class MenuTeleportButton : MonoBehaviour { @@ -28,6 +29,10 @@ public class MenuTeleportButton : MonoBehaviour private static MenuTeleportButton lastSelectedButton = null; private static bool initialized = false; + // External state: map must be held/visible + public static bool MapIsOpen = false; + private Menu menu; + private void Awake() { TeleportingSound = AudioManager.Instance.CreateInstance(FMODEvents.Instance.Teleport); //initialise the instance @@ -39,6 +44,7 @@ public class MenuTeleportButton : MonoBehaviour void Start() { button = GetComponent