コード例 #1
0
 private void Update()
 {
     if (allowOrbitWhileZooming != AllowOrbitWhileZooming)
     {
         allowOrbitWhileZooming = AllowOrbitWhileZooming;
         if (allowOrbitWhileZooming)
         {
             scaleGesture.AllowSimultaneousExecution(panGesture);
         }
         else
         {
             scaleGesture.DisallowSimultaneousExecution(panGesture);
         }
     }
 }
コード例 #2
0
ファイル: FingersOrbitScript.cs プロジェクト: dqchess/Pascal
 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;
        }