# GetTouch Coordinates Usage

**URL:** https://discussions.unity.com/t/gettouch-coordinates-usage/415855
**Category:** Mobile
**Tags:** iOS
**Created:** [June 15, 2010, 3:48am UTC](https://discussions.unity.com/t/gettouch-coordinates-usage/415855 "2010-06-15T03:48:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![schplurg](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/schplurg/32/132470_2.png) [@schplurg](https://discussions.unity.com/u/schplurg)
#### Post date: [June 15, 2010, 3:48am UTC](https://discussions.unity.com/t/gettouch-coordinates-usage/415855/1 "2010-06-15T03:48:59Z")

</div>

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:

```auto
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! 😅

---

<div class="post-metadata">

### Author: ![Dreamora](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/dreamora/32/91058_2.png) [@Dreamora](https://discussions.unity.com/u/Dreamora)
#### Post date: [June 15, 2010, 4:53am UTC](https://discussions.unity.com/t/gettouch-coordinates-usage/415855/2 "2010-06-15T04:53:18Z")

</div>

how about pos.x, pos.y? 🙂

---

<div class="post-metadata">

### Author: ![schplurg](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/schplurg/32/132470_2.png) [@schplurg](https://discussions.unity.com/u/schplurg)
#### Post date: [June 15, 2010, 5:38am UTC](https://discussions.unity.com/t/gettouch-coordinates-usage/415855/3 "2010-06-15T05:38:41Z")

</div>

Thank you! I was trying pos1.position.x

Oh well 😅

---

<div class="post-metadata">

### Author: ![Dreamora](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/dreamora/32/91058_2.png) [@Dreamora](https://discussions.unity.com/u/Dreamora)
#### Post date: [June 15, 2010, 6:05am UTC](https://discussions.unity.com/t/gettouch-coordinates-usage/415855/4 "2010-06-15T06:05:33Z")

</div>

no prob 🙂

normally you potentially would need it, if you just returned a transform / touch. but you explicitely requested the position (a VectorX with X 2 or 3 depending on what you get the position of, ui / screen or transform / ray etc)
