protected bool UpdateCameraPosition(VrPointer controller, PointerEventData pointerEventData)
        {
            Ray ray;

            if (controller.GetRay(out ray,
                                  (fromPoint, direction) => RaycastAll(pointerEventData, fromPoint, direction)))
            {
                uiCamera.transform.position = ray.origin;
                uiCamera.transform.rotation = Quaternion.LookRotation(ray.direction);
                return(true);
            }
            return(false);
        }
예제 #2
0
 public override void Reset()
 {
     Current    = null;
     Controller = null;
     base.Reset();
 }
 public void RemoveController(VrPointer controller)
 {
     controllerData.Remove(controller);
 }
 public void AddController(VrPointer controller)
 {
     controllerData.Add(controller, new ControllerData());
 }