I’m a beginner to Unity and have been fiddling around with it for the last few days. The end goal for me is to create a clickable world map as described here. The instructions on that page is what led me to initially try using Raycasthit.textureCoord to paint a the clicked portion of my map a certain color.
Right now, I’m just using a 5x3x1 cube with a plain white texture attached to it. As mentioned in the documentation, I’ve attached a mesh collider to the cube. Also, the script with the Raycasthit.textureCoord code is attached to the camera as instructed (it is copy + pasted from the documentation). I understand for the most part what the code means, (after reading into all the variables and types), but I don’t seem to understand why it’s not doing what it’s supposed to do (no console errors in sight).
Any help or direction would be appreciated!