diff --git a/3d-generation-pipeline/README.md b/3d-generation-pipeline/README.md index 590f68d5..ce7279dc 100644 --- a/3d-generation-pipeline/README.md +++ b/3d-generation-pipeline/README.md @@ -1,7 +1,6 @@ ### TODO * teha build kus archery range'is spawnitud objektid * FMOD ChannelControl errorid -* glTF-StableFramerate, Parent-GeneratedModel eemaldada? * speech-to-text: * uurida miks buildis Whisper halvemini töötab * proovida suuremat Whisperi mudelit, äkki töötab mürases keskkonnas paremini diff --git a/Assets/_PROJECT/Fonts/Quantico-Regular SDF.asset b/Assets/_PROJECT/Fonts/Quantico-Regular SDF.asset index c040079b..264efd47 100644 --- a/Assets/_PROJECT/Fonts/Quantico-Regular SDF.asset +++ b/Assets/_PROJECT/Fonts/Quantico-Regular SDF.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c6da6e2a1bfa3436e631a0c7bd3afef35852fabae8e08e7e277af3f0e8e952dd -size 2131946 +oid sha256:d09c00507bf4d21db32ed599ed55a41c1321e55ace99502b612ec8c41f29880e +size 2132997 diff --git a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity index a6c19ff1..21f70107 100644 --- a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity +++ b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e2dc87cbfcdd665c84a3eb9d040430c5fea2b67627accacbe9ae92bbf44f952c -size 68721707 +oid sha256:ad76cd1a8e049bbc6647a22fdfe0e712e0a17ac43d63ac0e2f68cc2aef7b7b8e +size 68713337 diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/Printer3D.cs b/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/Printer3D.cs index 2af09c5d..b57cdb3b 100644 --- a/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/Printer3D.cs +++ b/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/Printer3D.cs @@ -51,7 +51,7 @@ public class Printer3D : MonoBehaviour private void InitializeSpawnedObject(GameObject spawnedObject) { - GameObject spawnedObjectParent = new GameObject("SpawnedModelParent"); + GameObject spawnedObjectParent = new("SpawnedModelParent"); spawnedObjectParent.transform.parent = spawnPoint; spawnedObjectParent.transform.position = spawnPoint.transform.position; spawnedObjectParent.layer = ignorePlayerCollisionLayer; diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeScanner.cs b/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeScanner.cs index 7575c04b..d45b13ea 100644 --- a/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeScanner.cs +++ b/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeScanner.cs @@ -131,7 +131,7 @@ public class ShapeScanner : MonoBehaviour UpdateDisplay(percentage); } - private void OnConfigurationComplete() + private async void OnConfigurationComplete() { // Destroy colliding scannable objects HashSet allCollidingObjects = new(); @@ -145,17 +145,19 @@ public class ShapeScanner : MonoBehaviour var grab = collidingObject.GetComponent(); if (grab != null && grab.isSelected) { - var interactor = grab.firstInteractorSelecting; // the hand/controller currently holding it - if (interactor != null) + var interactors = new List(grab.interactorsSelecting); // the controllers currently holding it + foreach (var interactor in interactors) { // Transfer ownership: tell the manager to stop the selection interactionManager.SelectExit(interactor, grab); + grab.enabled = false; } } collidingObject.transform.position = Vector3.zero; Destroy(collidingObject); } + await Task.Delay(100); // Destroy all existing rays foreach (ShapeScannerRay ray in existingRays) { diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeScannerRay.cs b/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeScannerRay.cs index cc596dd4..0e0bdc40 100644 --- a/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeScannerRay.cs +++ b/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeScannerRay.cs @@ -40,9 +40,10 @@ public class ShapeScannerRay : MonoBehaviour private void OnTriggerEnter(Collider other) { - if (other.gameObject.tag == scannableTag) + if (other.gameObject.CompareTag(scannableTag)) { - collidingObjects.Add(other.gameObject); + GameObject parent = other.transform.parent.gameObject; + collidingObjects.Add(parent); // Only activate when this was the first object that entered collision if (collidingObjects.Count == 1) { @@ -64,9 +65,10 @@ public class ShapeScannerRay : MonoBehaviour private void OnTriggerExit(Collider other) { - if (other.gameObject.tag == "ShapeScannable") + if (other.gameObject.CompareTag(scannableTag)) { - collidingObjects.Remove(other.gameObject); + GameObject parent = other.transform.parent.gameObject; + collidingObjects.Remove(parent); if (collidingObjects.Count == 0) { foreach (MeshRenderer meshRenderer in meshRenderers)