private void LateUpdate() { //Grabbing if (grabbed) { ray = arCamera.GetRayFromGaze(); transform.position = ray.GetPoint(releaseDist); //Rotating the gameObject so that it always faces the user while grabbing the object. transform.rotation = GetObjectRotationWRTCamera(pickedRotation); } }
public void Start() { arCamera = ARCamera.Instance; controller = HoloboardController.Instance; ray = arCamera.GetRayFromGaze(); interactible = GetComponent <ARInteractible> (); }