3

I have a GameObject sphere in my program that represents the Earth.

So I apply a material to it like so:

Earth Material

Using data and a positioning script, I position markers on the globe that represent locations (by longitude and latitude).

Everything seems to work, except that the texture does not line up with the points plotted.

How can I shift the texture so that my data points are on top of the actual locations?

You can see this in the following figure, where South America points are clearly plotted over the ocean between Antarctica and South America in the wrong orientation.

South America Outline

EDIT:

After playing a lot, I found that X offset works, but Y offset does not work. The combination will help me accomplish the task, but it's not wrapping correctly...

Y Offset

Edric
  • 24,639
  • 13
  • 81
  • 91

2 Answers2

0

To create a new Material, use Assets->Create->Material from the main menu or the Project View context menu.

Drag your texture into the inspector field and change the Offset variables until you get the desired offset result.

enter image description here

Trent
  • 4,208
  • 5
  • 24
  • 46
  • I made an edit just after you posted this. Offset is definitely the answer, but why would the Y offset behave as shown above? –  Mar 18 '16 at 18:19
  • 1
    Quite simply because of the way you created your texture. Take a look at the square texture shown in your Material inspector above. Antarctica only wraps nicely because it is at the bottom point of your sphere, causing it to wrap spherically. Now you're shifting the texture vertically on the y-axis which is causing the equator to spherically wrap. I suspect it'd be easier to programmatically assign an offset during your data point assignment. – Trent Mar 18 '16 at 18:32
0

You should consider using modeling programs such as Blender for creating textured models or circles but keep in mind if you have textured models it needs to be in .fbx format.

DzoniGames
  • 91
  • 10