How to make my GUItexture rotate ???

Hi,
I have a question like in the subject

var wyjscie: GUITexture;
wyjscie.transform.Rotate(Vector3(0,0,1) * Time.deltaTime);

this one does not work :frowning:

GUITextures don’t rotate. Use a texture on a plane, or OnGUI, which can rotate by setting the matrix (most easily through the RotateAroundPivot utility function).

–Eric

var wyjscie: GUITexture;
wyjscie.transform.RotateAroundPivot (50*Time.deltaTime, Vector2(0,0,1));

it does not work as well

Like I said, you have to use OnGUI. GUITexture does not rotate.

–Eric

Your using rotatearound pivot wrong. Check the example in the scripting guide.

It doesn’t work the same way as transform. It is a standalone command which rotates the GUI (so you will find you call the command, place the GUI, then rotate back so future items aren’t effected by the rotation)

As Eric said needs to be used in onGUI or a function called from onGUI