- Home /
iTween RotateTo ... works on GuiTexture?
following code has no effect.
var shine1 : GameObject; //GUITexture dumped in here
function myFunc(){
iTween.RotateTo(shine1,{"rotation":Vector3(0,0,45),"time":0,"delay":0});
}
iTween is great, but heavily un-documented.
Answer by Eric5h5 · Jul 14, 2011 at 09:18 AM
GUITextures can't be rotated.
Wrong. i've seen a snippet of code somewhere on UA which creates a rotatable GUI Component
@biohazard: (Need an eye-rolling emoticon here.) I'm not wrong. GUITextures cannot be rotated, period. You've never seen any code anywhere which rotates GUITextures, because they simply don't have that capability.
You do realize pissing off gurus will complicate future learning abilities, right? ;-)
well, i DO realize this guy is nowhere close to being a guru. he's more of a smartass mouthwhore pretending to know everything
Answer by Koekepan · Jul 14, 2011 at 12:34 PM
I used something like this to rotate the buttons on my level editor GUI menu thingy:
var btnTexture : Texture;
var rotation = 45;
var matrixBackup:Matrix4x4 = GUI.matrix;
GUIUtility.RotateAroundPivot(rotation, Vector2(25, 25));
GUI.Label(0, 0, 50,50),btnTexture);
GUI.matrix = matrixBackup;
Your answer
Follow this Question
Related Questions
How to make a GUI Texture clickable when it's a gameobject animted through iTween? 2 Answers
iTween on GuiTexture 1 Answer
Scale a GUITexture from its center 1 Answer
iTween RotateTo in C# 1 Answer
iTween RotateTo 1 Answer