protected bool UpdateCameraPosition(RayPointer 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);
        }
 public void AddController(RayPointer controller)
 {
     controllerData.Add(controller, new ControllerData());
 }
 public void RemoveController(RayPointer controller)
 {
     controllerData.Remove(controller);
 }
Ejemplo n.º 4
0
 public override void Reset()
 {
     Current    = null;
     Controller = null;
     base.Reset();
 }