Author Topic: Conflict Ondrag vs Pinch  (Read 1867 times)

joreldraw

  • Guest
Conflict Ondrag vs Pinch
« on: September 27, 2012, 05:27:14 AM »
I have a Draggable panel and i discover a conflict with drag and pinch.

Pinch is not include how an event on Ngui but this occur when the Input.toucCount = 2
OnDrag not check how many touch are in use and this make a conflict doing pinch (zoom) & drag in sametime.

My solution is easy to implement

File: UIDraggablePanelContents.cs
Line: 78
  1. void OnDrag (Vector2 delta)
  2.         {
  3.                 if (enabled && NGUITools.GetActive(gameObject) && draggablePanel != null && Input.touchCount < 2 )
  4.                 {
  5.                         draggablePanel.Drag(delta);
  6.                 }
  7.         }