- Home /
Rotating texture around sphere
I have a checkerboard texture that I want to rotate around a sphere's X and Z axes depending on user input.
Anybody know how?
Answer by Fabkins · Nov 06, 2011 at 12:24 AM
You can animate a texture using the mainTextureOffset call. See:
http://unity3d.com/support/documentation/ScriptReference/Material.SetTextureOffset.html
Now this wont translate directly to your question. This is because this 2D shift of the texture is relative the surface of an object not the world.
Hence, if you have a surface that is flat against the X,Z plane, ie on the floor, then any X,Y Offset of the texture will in real terms be animated on the X,Z.
Answer by DaveA · Nov 04, 2011 at 10:18 PM
Just alter the Offset parameters on the Material the texture is in.
That's great. Thanks.
One other thing though, is it possible to rotate the texture around the object's Z axis ins$$anonymous$$d of the Y?
Your answer
Follow this Question
Related Questions
How to get an object to turn around/flip at a certain point 2 Answers
rotate a texture inside a cube 1 Answer
Can i add texture to multiple layers of player? and how? 0 Answers
Highlighting parts of an object 1 Answer
Rotating Textures 0 Answers