I have a question regarding the exact method for getting the game object that I'm touching. I thought it would be getting the name of the PressGesture once the touch starts...but it returns me a Swipe Controller object name, so that is not the correct. I have read, though not extensively, the TouchScript documentation, but I haven't found a method that gets information from the point you are touching/clicking
This is the code that tries to solve that issue (of course, the wrong way):
private void pressedHandler(object sender, EventArgs e)
{
PressGesture gesture = sender as PressGesture;
TouchHit hit;
gesture.GetTargetHitResult (out hit);
startPos = hit.Point;
if(gesture.gameObject == this.swipePositions[0])
{
Debug.Log ("Pressed on: " + gesture.gameObject.name + " at: " + startPos);
}
else
{
Debug.Log("Not even from the start...");
Debug.Log("This name is: " +gesture.gameObject.name);
Debug.Log("The name should be: " +this.swipePositions[0].name);
}
}