I’m sure this is simple. Somehow I completed my first game without needing to know this.
I am trying to learn how to use GetTouch etc rather than the mouse/button input. Crazy how something so seemingly rudimentary is such a pain to learn for me.
So I have this code:
if (iPhoneInput.touchCount >0){
pos1 = iPhoneInput.GetTouch(0).position
}
How do I use this so I can detect if a touch was made in a specific area of the screen? Say between x locations 100 and 200.
In other words, how can I parse the variable pos1 to get the x and the y as an integer? I’m not interested in touching objects or GUI elements, just screen coordinates.
Thanks! ![]()