- Home /
In-game Map - Texture to World Coordinates
Hello everyone! A contract artist is providing us with stylized maps of the areas in our game, and I'm making the icon move to certain points on the area corresponding to the area the player is in. The player cannot move freely and thus chooses locations to go to. As the maps aren't one-to-one, I decided to define a pixel position on the map texture in each sub-area, which then sets the icon to the corresponding local position on the map object. I've managed to get it to work in a blank scene in 2D, but this game is 3D and you're able to interact with objects, including the map, so it's not as simple as my test.
As an example, say I had a 512x512 texture and I want the icon to go to the point (128, 85) on the texture. It should go to a local position on the map object itself corresponding to (128, 85). In other words, say (128, 85) is on a pier in the texture. I want it to end up on the pier part of the texture when I convert the texture to local space.
Any ideas?
Your answer
Follow this Question
Related Questions
How to make Stellaris Map in Unity3D? 1 Answer
Can't see textures 0 Answers
Terrain texture getting black tinted 0 Answers
How to use more than 32 textures on terrains in Unity 5? 1 Answer