1
0
forked from cgvr/DeltaVR

simplify shape scanner code

This commit is contained in:
2026-03-16 12:31:43 +02:00
parent f101de5390
commit d6c2878491

View File

@@ -145,13 +145,7 @@ public class ShapeScanner : MonoBehaviour
var grab = collidingObject.GetComponent<XRGrabInteractable>(); var grab = collidingObject.GetComponent<XRGrabInteractable>();
if (grab != null && grab.isSelected) if (grab != null && grab.isSelected)
{ {
var interactors = new List<IXRSelectInteractor>(grab.interactorsSelecting); // the controllers currently holding it grab.enabled = false;
foreach (var interactor in interactors)
{
// Transfer ownership: tell the manager to stop the selection
//interactionManager.SelectExit(interactor, grab); // Not necessary, creates errors
grab.enabled = false;
}
} }
collidingObject.transform.position = Vector3.zero; collidingObject.transform.position = Vector3.zero;
Destroy(collidingObject); Destroy(collidingObject);