public override void OnManipulationStarted(VRInteraction caller) { base.OnManipulationStarted(caller); rby.useGravity = false; rby.isKinematic = true; currSelectingCtrl = null; }
public override void OnSelected(VRInteraction caller) { base.OnSelected(caller); HandController_Ray rayCtrl = caller as HandController_Ray; if (rayCtrl != null) { referencePos = tRoot.position; rayCtrl.SetRenderLine(false); currSelectingCtrl = rayCtrl; } }
public override void OnDeselected(VRInteraction caller) { base.OnDeselected(caller); HandController_Ray rayCtrl = caller as HandController_Ray; if (rayCtrl != null) { rayCtrl.SetRenderLine(true); currSelectingCtrl = null; rby.useGravity = true; rby.isKinematic = false; } }
private void CashRayAndTouchInteractions() { touchIntRight = rightWand.GetComponentInChildren <HandController_Touch>(true); touchIntLeft = leftWand.GetComponentInChildren <HandController_Touch>(true); rayIntRight = rightWand.GetComponentInChildren <HandController_Ray>(true); rayIntLeft = leftWand.GetComponentInChildren <HandController_Ray>(true); HandController[] allInteractions = new HandController[4] { touchIntLeft, touchIntRight, rayIntRight, rayIntLeft }; Array.ForEach(allInteractions, i => { if (i != null) { i.enabled = false; } }); }