- Home /
Question by
robertmathew · Mar 16, 2011 at 09:27 AM ·
texturerotatecubeinside
rotate a texture inside a cube
i want to rotate a two different texture on the surface of the cube with out rotating the cube cube should remain constant it should not rotate but texture should should rotate continuesly on the cube surface
Comment
Best Answer
Answer by robertmathew · Mar 16, 2011 at 10:03 AM
var scrollSpeed : float = 0.5;
function Update()
{
var offset : float = Time.time * scrollSpeed;
renderer.material.mainTextureOffset = Vector2 (offset, 0);
}
this is the answer i am looking for
from what point does this rotate the texture? The middle of a face of the cube? the corner of a face of the cube? or some other way?
it starts from left corner and run continuously to right corner
Your answer
Follow this Question
Related Questions
Cube doesn't follow camera 1 Answer
Change a cube face with another texture 3 Answers
White dots between two cubes? 0 Answers
Applying texture to quads on procedural cube 1 Answer
Change texture of cube sides 3 Answers