1
0
forked from cgvr/DeltaVR

remove SelectExit from shape scanner

This commit is contained in:
2026-03-16 12:29:07 +02:00
parent 58d5f24069
commit f101de5390

View File

@@ -131,7 +131,7 @@ public class ShapeScanner : MonoBehaviour
UpdateDisplay(percentage); UpdateDisplay(percentage);
} }
private async void OnConfigurationComplete() private void OnConfigurationComplete()
{ {
// Destroy colliding scannable objects // Destroy colliding scannable objects
HashSet<GameObject> allCollidingObjects = new(); HashSet<GameObject> allCollidingObjects = new();
@@ -149,7 +149,7 @@ public class ShapeScanner : MonoBehaviour
foreach (var interactor in interactors) foreach (var interactor in interactors)
{ {
// Transfer ownership: tell the manager to stop the selection // Transfer ownership: tell the manager to stop the selection
interactionManager.SelectExit(interactor, grab); //interactionManager.SelectExit(interactor, grab); // Not necessary, creates errors
grab.enabled = false; grab.enabled = false;
} }
} }
@@ -157,13 +157,13 @@ public class ShapeScanner : MonoBehaviour
Destroy(collidingObject); Destroy(collidingObject);
} }
await Task.Delay(100);
// Destroy all existing rays // Destroy all existing rays
foreach (ShapeScannerRay ray in existingRays) foreach (ShapeScannerRay ray in existingRays)
{ {
Destroy(ray.gameObject); Destroy(ray.gameObject);
} }
existingRays.Clear(); existingRays.Clear();
correctRayCount = 0;
// Play sound effect and emit particles // Play sound effect and emit particles
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.ShapeScannerSuccess, gameObject); AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.ShapeScannerSuccess, gameObject);