Ejemplo n.º 1
0
 //!
 //! triple touch down & moving (called by Mouse or Touch Input)
 //! @param      pos     screen position of third pointer
 //!
 public void threePointerDrag(Vector3 pos)
 {
     if (mainController.ActiveMode == MainController.Mode.oneForAllMode)
     {
         Vector3 newHitPosition = objectRaycast(pos, mainController.planeCollider);
         if (hitPositionBuffer != nullVector && newHitPosition != nullVector)
         {
             mainController.moveSelectionAwayFromCamera((newHitPosition - hitPositionBuffer).y);
             hitPositionBuffer = newHitPosition;
         }
     }
     else
     {
         if (Camera.main.orthographic == false)
         {
             mainController.moveCameraObject(((new Vector3(0, 0, pos.y) - camMovePos) * Time.deltaTime) * forwardSpeed);
         }
         else
         {
             Camera.main.orthographicSize = Camera.main.orthographicSize + (((camMovePos.z - pos.y) * Time.deltaTime) / 100f);
         }
     }
 }