x


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

more ▼

asked Mar 16, 2011 at 09:27 AM

robertmathew gravatar image

robertmathew
586 99 80 94

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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

more ▼

answered Mar 16, 2011 at 10:03 AM

robertmathew gravatar image

robertmathew
586 99 80 94

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?

Mar 16, 2011 at 10:08 AM dissidently

it starts from left corner and run continuously to right corner

Mar 16, 2011 at 10:26 AM robertmathew

that's called scrolling. rotating spins it around.

Mar 16, 2011 at 03:40 PM DaveA
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3588
x1180
x453
x45

asked: Mar 16, 2011 at 09:27 AM

Seen: 3446 times

Last Updated: Mar 16, 2011 at 06:07 PM