forked from cgvr/DeltaVR
simplify shape scanner code
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user