void Update() { if (!VRInput.TryGetDevices()) { return; } // Device rotation //VRInput.GetControllerTransform(VRInput.primaryController, out Vector3 position, out Quaternion rotation); Transform laserTransform = GlobalState.GetControllerLaser(); // The main cursor object always follows the controller // so that the collider sticks to the actual hand position. transform.position = laserTransform.position; transform.rotation = laserTransform.rotation; if (null != ray) { if (GlobalState.IsGrippingWorld) { ray.gameObject.SetActive(false); widgetClicked = null; } else { HandleRaycast(); } } }