diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeScanner.cs b/Assets/_PROJECT/Scripts/ModeGeneration/ShapeDetection/ShapeScanner.cs index d45b13ea..f3945e79 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 async void OnConfigurationComplete() + private void OnConfigurationComplete() { // Destroy colliding scannable objects HashSet allCollidingObjects = new(); @@ -149,7 +149,7 @@ public class ShapeScanner : MonoBehaviour foreach (var interactor in interactors) { // Transfer ownership: tell the manager to stop the selection - interactionManager.SelectExit(interactor, grab); + //interactionManager.SelectExit(interactor, grab); // Not necessary, creates errors grab.enabled = false; } } @@ -157,13 +157,13 @@ public class ShapeScanner : MonoBehaviour Destroy(collidingObject); } - await Task.Delay(100); // Destroy all existing rays foreach (ShapeScannerRay ray in existingRays) { Destroy(ray.gameObject); } existingRays.Clear(); + correctRayCount = 0; // Play sound effect and emit particles AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.ShapeScannerSuccess, gameObject);