texture on mesh.sphere doesnt move?

i have a spinning mesh.sphere and a texture applied to it, and the mesh spins fine, but the texture doesnt seem to move for some reason.

heres bits from the code that are relevant

--

ball.Radius = 0.6f;

ball.Mesh =Mesh.Sphere(dev, ball.Radius, 50, 50);

ball.Texture =TextureLoader.FromFile(dev,"banana.bmp");

dev.SetTexture(0, ball.Texture);

ball.Mesh.DrawSubset(0);

id appreciate help on this as its befudled me :(

[812 byte] By [hello0101011] at [2007-12-23]
# 1
I'm not sure if this is the problem, but I know from texture experience in Maya and other 3D packages that if a texture isn't moving with its mesh, then the projection of the texture onto the mesh isn't locked. This means that as the mesh moves, the projection stays still.

See if there's any way to tell the texture projection to bake UVs onto the mesh, or lock the projector to the object.

Soviut at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...
# 2

Need more code.

1. How are you setting texture coordinates?

2. How are you spinning the mesh?

TheZMan at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...
# 3

If Mesh.Sphere() is functionally the same as D3DXCreateSphere() then you wont get texture coordinates. It creates your geometry using position and normal only.

Texturing a sphere is non-trivial (a few awkward cases at the poles to be careful of for example), but you'll have to do it yourself. You might be able to use the UV Atlas parts of D3DX to generate it for you.

hth
Jack

JackHoxley at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...