# touch position to world position 2D

**URL:** https://discussions.unity.com/t/touch-position-to-world-position-2d/119468
**Category:** Questions & Answers
**Created:** [October 14, 2014, 7:54pm UTC](https://discussions.unity.com/t/touch-position-to-world-position-2d/119468 "2014-10-14T19:54:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![udi1997](https://avatars.discourse-cdn.com/v4/letter/u/edb3f5/32.png) [@udi1997](https://discussions.unity.com/u/udi1997)
#### Post date: [October 14, 2014, 7:54pm UTC](https://discussions.unity.com/t/touch-position-to-world-position-2d/119468/1 "2014-10-14T19:54:18Z")

</div>

How can I transform the touch position (On phones) to world position.  
For instance if my phone’s screen size is 1440 by 2560 and my touch position on the phone is X 600 Y 700. How can I transform that position to world position on unity?

I need that so I can know where the user put his finger.

---

<div class="post-metadata">

### Author: ![robertbu](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@robertbu](https://discussions.unity.com/u/robertbu)
#### Post date: [October 14, 2014, 8:14pm UTC](https://discussions.unity.com/t/touch-position-to-world-position-2d/119468/2 "2014-10-14T20:14:21Z")

</div>

There is no true 2D position. Even when using 2D features, positions are still 3D. For 2D, Orthographic camera, with rotation (0,0,0) you can do:

```
 var pos = Camera.main.ScreenToWorldPoint(touchposition);
 pos.z = transform.position.z;

```

This will be the finger position at the ‘z’ position of the object with the script.

---

<div class="post-metadata">

### Author: ![Digger8048](https://avatars.discourse-cdn.com/v4/letter/d/f08c70/32.png) [@Digger8048](https://discussions.unity.com/u/Digger8048)
#### Post date: [October 14, 2014, 10:23pm UTC](https://discussions.unity.com/t/touch-position-to-world-position-2d/119468/3 "2014-10-14T22:23:31Z")

</div>

Vector3 screenPos = new Vector3(Input.mousePosition, Input.mousePosition, 10);  
Vector3 worldPos = Camera.main.ScreenToWorldPoint(screenPos);

worldpos will be a world point where you touched, 10 meters from the camera.
