Skip to content
Permalink
Browse files

Merge branch 'develop' into gh-213-emptyDialogStack

  • Loading branch information...
mediumTaj committed Feb 22, 2017
2 parents 622a549 + 79677c0 commit 1eac6bb14aa7d95e36fdfaa2a9724d120b3a7758
Showing with 14 additions and 7 deletions.
  1. +14 −7 Scripts/Utilities/TouchEventManager.cs
@@ -479,7 +479,10 @@ private void OneFingerTransformedHandler(object sender, System.EventArgs e)
RaycastResult hitToFire2DEventSystem = default(RaycastResult);
#endif

//Log.Status ("TouchEventManager", "oneFingerManipulationTransformedHandler: {0}", m_OneFingerMoveGesture.DeltaPosition);
#if ENABLE_DEBUGGING
Log.Debug ("TouchEventManager", "oneFingerManipulationTransformedHandler: {0}, MainCamera: {1}", m_OneFingerMoveGesture.ScreenPosition, MainCamera.name);
#endif

if (m_Active)
{
TouchEventData dragEventToFire = null;
@@ -493,15 +496,15 @@ private void OneFingerTransformedHandler(object sender, System.EventArgs e)
//Adding Variables for 3D Touch Check
Transform hitTransform3D = null;
RaycastHit hit3D = default(RaycastHit);
bool isHitOnLayer3D = Physics.Raycast(rayForDrag, out hit3D, Mathf.Infinity, kp.Key);
bool isHitOnLayer3D = Physics.Raycast(rayForDrag, out hit3D, Mathf.Infinity);
if (isHitOnLayer3D)
{
hitTransform3D = hit3D.collider.transform;
}

//Adding Variables for 2D Touch Check for 2d Colliders
Transform hitTransform2D = null;
RaycastHit2D hit2D = Physics2D.Raycast(rayForDrag.origin, rayForDrag.direction, Mathf.Infinity, kp.Key);
RaycastHit2D hit2D = Physics2D.Raycast(rayForDrag.origin, rayForDrag.direction, Mathf.Infinity);
bool isHitOnLayer2D = false;
if (hit2D.collider != null)
{
@@ -534,6 +537,10 @@ private void OneFingerTransformedHandler(object sender, System.EventArgs e)
}
#endif

#if ENABLE_DEBUGGING
Log.Debug ("TouchEventManager", "For Finger: {0} , isHitOnLayer3D: {1}, isHitOnLayer2D: {2}, isHitOnLayer2DEventSystem: {3} ", kp.Key, isHitOnLayer3D, isHitOnLayer2D, isHitOnLayer2DEventSystem);
#endif

for (int i = 0; i < kp.Value.Count; ++i)
{
TouchEventData dragEventData = kp.Value[i];
@@ -567,7 +574,7 @@ private void OneFingerTransformedHandler(object sender, System.EventArgs e)
hitToFire2D = default(RaycastHit2D);
hitToFire2DEventSystem = default(RaycastResult);
#if ENABLE_DEBUGGING
Log.Debug("TouchEventManager", "Inside - OneFingerDrag Event Found 3D. itemCollider: {0}, callback: {1}, SortingLayer: {2}, isTapInside: {3} ",hitTransform3D, dragEventData.DragCallback, dragEventData.SortingLayer, dragEventData.IsInside);
Log.Debug("TouchEventManager", "Inside - OneFingerDrag Event Found 3D. itemCollider: {0}, callback: {1}, SortingLayer: {2}, isTapInside: {3} ",hitTransform3D, dragEventData.DragCallback, dragEventData.SortingLayer, dragEventData.IsInside);
#endif
}
else
@@ -581,7 +588,7 @@ private void OneFingerTransformedHandler(object sender, System.EventArgs e)
hitToFire2DEventSystem = default(RaycastResult);

#if ENABLE_DEBUGGING
Log.Debug("TouchEventManager", "Inside - OneFingerDrag Found 3D. itemCollider: {0}, callback: {1}, SortingLayer: {2}, isTapInside: {3} ",hitTransform3D, dragEventData.DragCallback, dragEventData.SortingLayer, dragEventData.IsInside);
Log.Debug("TouchEventManager", "Inside - OneFingerDrag Found 3D. itemCollider: {0}, callback: {1}, SortingLayer: {2}, isTapInside: {3} ",hitTransform3D, dragEventData.DragCallback, dragEventData.SortingLayer, dragEventData.IsInside);
#endif
}
else
@@ -820,15 +827,15 @@ private void TwoFingerTransformedHandler(object sender, System.EventArgs e)
//Adding Variables for 3D Touch Check
Transform hitTransform3D = null;
RaycastHit hit3D = default(RaycastHit);
bool isHitOnLayer3D = Physics.Raycast(rayForDrag, out hit3D, Mathf.Infinity, kp.Key);
bool isHitOnLayer3D = Physics.Raycast(rayForDrag, out hit3D, Mathf.Infinity);
if (isHitOnLayer3D)
{
hitTransform3D = hit3D.collider.transform;
}

//Adding Variables for 2D Touch Check for 2d Colliders
Transform hitTransform2D = null;
RaycastHit2D hit2D = Physics2D.Raycast(rayForDrag.origin, rayForDrag.direction, Mathf.Infinity, kp.Key);
RaycastHit2D hit2D = Physics2D.Raycast(rayForDrag.origin, rayForDrag.direction, Mathf.Infinity);
bool isHitOnLayer2D = false;
if (hit2D.collider != null)
{

0 comments on commit 1eac6bb

Please sign in to comment.
You can’t perform that action at this time.