- Home /
From 2D UI coordinates to WorlSpace
Hi! I've got mesh with a texture. Let's say it is a curved screen. I need to mark some areas of this curved screen dinamically. What i'd like to do is to have the texture used for the curved screen loaded somewhere and select the points that need to be higlieted on the curved screen mesh. My questions are: What do you think is the best way to do this? How can I convert texture coordinates to world space? I hope I was a little clear.
Answer by piter00999 · Nov 26, 2018 at 05:51 PM
Imo checkout raycasting (this is script which selects triangle that was clicked with mouse so almost what you want from what I can understand https://docs.unity3d.com/ScriptReference/RaycastHit-triangleIndex.html), remember object has to have MeshCollider object added so raycasting can work properly!