# How to map the UV coordinate to the actual coordinate in the image

**URL:** <https://forum.babylonjs.com/t/how-to-map-the-uv-coordinate-to-the-actual-coordinate-in-the-image/41541>\
**Category:** Questions\
**Created:** [June 11, 2023, 3:21am UTC](https://forum.babylonjs.com/t/how-to-map-the-uv-coordinate-to-the-actual-coordinate-in-the-image/41541 "2023-06-11T03:21:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akshat\_Agrawal](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Akshat\_Agrawal](https://forum.babylonjs.com/u/Akshat_Agrawal)\
**Post date:** [June 11, 2023, 3:21am UTC](https://forum.babylonjs.com/t/how-to-map-the-uv-coordinate-to-the-actual-coordinate-in-the-image/41541/1 "2023-06-11T03:21:58Z")

</div>

Hi, i’m trying to put the image where the user click on the dynamic texture. I want the center of the image to be where the user clicks. So far i’ve done this.

> **[Babylon.js Playground](https://playground.babylonjs.com/#5ZCGRM%234284)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

But i’m not able to get the actual coordinates of the texture from the UV coordinates. How can i do this??

---

<div class="post-metadata">

**Author:** ![alexchuber](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/alexchuber/32/52000_2.png) [@alexchuber](https://forum.babylonjs.com/u/alexchuber)\
**Post date:** [June 11, 2023, 6:21am UTC](https://forum.babylonjs.com/t/how-to-map-the-uv-coordinate-to-the-actual-coordinate-in-the-image/41541/2 "2023-06-11T06:21:47Z")

</div>

Hi there!

I think what you’re looking for is [`getTextureCoordinates().`](https://doc.babylonjs.com/typedoc/classes/BABYLON.PickingInfo#getTextureCoordinates)

`bu` and `bv` are barycentric UV coordinates, which are used by `getTextureCoordinates()` to calculate the texture coordinates we want.

Here’s an updated playground. Also note that the mapping from v to y is different than u to x 😮

> **[Babylon.js Playground](https://playground.babylonjs.com/#5ZCGRM%234310)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![Akshat\_Agrawal](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Akshat\_Agrawal](https://forum.babylonjs.com/u/Akshat_Agrawal)\
**Post date:** [June 11, 2023, 6:29am UTC](https://forum.babylonjs.com/t/how-to-map-the-uv-coordinate-to-the-actual-coordinate-in-the-image/41541/3 "2023-06-11T06:29:19Z")

</div>

Thank you so much @alexchuber.
