Example #1
0
		void TouchExit(IGestureInfo[] infos)
		{
			if (isMoved == false)
				return;

			// UI要素にあたっていないかを検知する
			var pointerData = new PointerEventData(EventSystem.current);
			pointerData.position = infos[0].Pos;
			List<RaycastResult> result = new List<RaycastResult>();
			EventSystem.current.RaycastAll(pointerData, result);
			if (result.Count > 0)
			{
				share.fallPointer.gameObject.SetActive(false);
				return;
			}

			Ray ray = mainCamera.ScreenPointToRay(infos[0].Pos);
			RaycastHit hit;

			if (Physics.Raycast(ray, out hit))
			{
				share.fallPointer.transform.position = hit.point;
				isFallPointRegisted = true;
			}			
		}
Example #2
0
	void Move(IGestureInfo[] info)
	{
		for (int i = 0; i < info.Length; ++i)
		{
			CreatePoint(info[i].FingerID, info[i].Pos);
		}
	}
Example #3
0
		void TouchMove(IGestureInfo[] infos)
		{
			isMoved = true;
			Ray ray = mainCamera.ScreenPointToRay(infos[0].Pos);
			RaycastHit hit;

			if (Physics.Raycast(ray, out hit))
			{
				share.fallPointer.gameObject.SetActive(true);
				share.fallPointer.transform.position = hit.point;
			}
		}
Example #4
0
	void Cancel(IGestureInfo[] info)
	{
		for (int i = 0; i < info.Length; ++i)
		{
			RemovePoint(info[i].FingerID);
		}
	}