Assets/Watson/Scripts/Camera/WatsonCamera.cs
/// <summary>
/// Event handler to pan and zoom with two-finger dragging
/// </summary>
/// <param name="args">Arguments.</param>
Event handler to pan and zoom with two-finger dragging
Event handler to pan and zoom with two - finger dragging
public virtual void DragTwoFinger(System.Object[] args)
        {
            if (m_DisableInteractivity)
                return;
            if (args != null && args.Length > 0 && args[0] is TouchScript.Gestures.ScreenTransformGesture)
            {
                TouchScript.Gestures.ScreenTransformGesture transformGesture = args[0] as TouchScript.Gestures.ScreenTransformGesture;
                DefaultCameraTarget.TargetPosition += (transformGesture.DeltaPosition * m_PanSpeed * -1.0f);
                DefaultCameraTarget.TargetPosition += transform.forward * (transformGesture.DeltaScale - 1.0f) * m_ZoomSpeed;
            }
            else
            {
                Log.Warning("WatsonCamera", "TwoFinger drag has invalid argument");
            }
        }
public virtual void DragTwoFinger ( System . Object [ ] args ) { if ( m_DisableInteractivity ) return ; if ( args != null && args . Length > 0 && args [ 0 ] is TouchScript . Gestures . ScreenTransformGesture ) { TouchScript . Gestures . ScreenTransformGesture transformGesture = args [ 0 ] as TouchScript . Gestures . ScreenTransformGesture ; DefaultCameraTarget . TargetPosition += ( transformGesture . DeltaPosition * m_PanSpeed * - 1.0f ) ; DefaultCameraTarget . TargetPosition += transform . forward * ( transformGesture . DeltaScale - 1.0f ) * m_ZoomSpeed ; } else { Log . Warning ( " " , " " ) ; } }
Event handler to pan and zoom with two-finger dragging
Event handler to pan and zoom with two - finger dragging
//Pannning with 2-finger //Zooming with 2-finger
args
System.Object[]
None