# How to project a texture/shape to specific part of a mesh?

**URL:** <https://discourse.threejs.org/t/how-to-project-a-texture-shape-to-specific-part-of-a-mesh/30622>\
**Category:** Questions\
**Tags:** mesh, textures, shaders\
**Created:** [October 8, 2021, 9:09am UTC](https://discourse.threejs.org/t/how-to-project-a-texture-shape-to-specific-part-of-a-mesh/30622 "2021-10-08T09:09:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ertu.cetin](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ertu.cetin/32/21441_2.png) [@ertu.cetin](https://discourse.threejs.org/u/ertu.cetin)\
**Post date:** [October 8, 2021, 9:09am UTC](https://discourse.threejs.org/t/how-to-project-a-texture-shape-to-specific-part-of-a-mesh/30622/1 "2021-10-08T09:09:12Z")

</div>

Hi all, I’d like to project a texture or some shape ( transparent - ring, circle) to a mesh **(but to a specific part)**. For example, in MMORPG games we select/click an enemy or NPC then we see some circle under the character which indicates a selection. That circle changes its shape based on the mesh (height, slope), you can check the following images.

I’d like to do that, but I’m not sure how to do it, perfectly - so far I tried to raycast a mesh and got the vertices normal and applied the rotation but when it comes to more complex part of the mesh this does not work well enough. I think I need to use shaders? Is there any resource I can check?

![Screen Shot 2021-10-08 at 11.43.56](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/2/0/20a70638c33140692449e7893e4a491a6df2afc1.jpeg)  
 ![Screen Shot 2021-10-08 at 11.44.14](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/2/d/2df6daf6614fe90ba982413e501aa72a5817f4d9.png)

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [October 8, 2021, 1:38pm UTC](https://discourse.threejs.org/t/how-to-project-a-texture-shape-to-specific-part-of-a-mesh/30622/2 "2021-10-08T13:38:24Z")

</div>

Hi!  
Answered on SO:

> <https://stackoverflow.com/questions/69495736/how-to-project-a-texture-shape-to-specific-part-of-a-mesh-in-three-js/69496745#69496745>
