Da Fish in Sea

These are the voyages of Captain Observant

The Moon (Texture Mapping a Sphere)

| Comments

A week or two ago I made a sphere and managed to map a texture onto it. However it was scrunched up at the poles. The way to avoid this is to use a texture which compensates for this. Such images are often made of planets, including the earth. Tonight I found a nice texture map of the moon here and so I put it onto the Sphere I did before. Now I wanted to try using the pointing trick I did earlier to enable some drag control of the rotation of the sphere. I got this to work OK, but only in one axis of rotation. Trying to get it to work in more axis led to much frustration. There is an easier way, explained in this tutorial on mapping spheres which simply appends rotations onto the Sphere’s matrix. But, being stubborn, I wanted to try my way first. However, next time I think I will do it the easy way :) , without the whole pointTowards thing, though that might be handy in some other situations. Apparently the moon has a bum, who knew? :D

flash 10 required

Da Code

Moon.as