示例#1
0
 private void Update()
 {
     if (allowOrbitWhileZooming != AllowOrbitWhileZooming)
     {
         allowOrbitWhileZooming = AllowOrbitWhileZooming;
         if (allowOrbitWhileZooming)
         {
             scaleGesture.AllowSimultaneousExecution(panGesture);
         }
         else
         {
             scaleGesture.DisallowSimultaneousExecution(panGesture);
         }
     }
 }
示例#2
0
 private void Update()
 {
     if (allowOrbitWhileZooming != AllowOrbitWhileZooming)
     {
         allowOrbitWhileZooming = AllowOrbitWhileZooming;
         if (allowOrbitWhileZooming)
         {
             scaleGesture.AllowSimultaneousExecution(panGesture);
         }
         else
         {
             scaleGesture.DisallowSimultaneousExecution(panGesture);
         }
     }
     scaleGesture.ZoomSpeed = ZoomSpeed;
     UpdateOrbit(panVelocity.x, panVelocity.y);
     panVelocity = panVelocity * OrbitInertia;
 }
示例#3
0
        protected virtual void LateUpdate()
        {
            if (allowOrbitWhileZooming != AllowOrbitWhileZooming)
            {
                allowOrbitWhileZooming = AllowOrbitWhileZooming;
                if (allowOrbitWhileZooming)
                {
                    scaleGesture.AllowSimultaneousExecution(panGesture);
                }
                else
                {
                    scaleGesture.DisallowSimultaneousExecution(panGesture);
                }
            }
            Vector3 startPos = Orbiter.transform.position;

            UpdateOrbit(panVelocity.x, panVelocity.y);
            UpdateZoom();
            ClampDistance(startPos);
            panVelocity *= OrbitInertia;
            zoomSpeed   *= OrbitInertia;
        }