- Home /
Draw a rotated image on GUI
Hi everyone! I would like to know if there is some away to draw a rotated image on the GUI. Or I must have all the images (even when is the same image in diferent angle ) in my assets? I would appreciate any help.
Comment
Best Answer
Answer by Mike 3 · Sep 24, 2010 at 05:10 PM
Look up GUIUtility.RotateAroundPivot, which you use with GUI.matrix (you store the original matrix, use the rotated matrix, draw your texture then reset the original matrix).
http://unity3d.com/support/documentation/ScriptReference/GUIUtility.RotateAroundPivot.html
http://unity3d.com/support/documentation/ScriptReference/GUI-matrix.html
Or ints$$anonymous$$d of storing reset it:
GUI.matrix = $$anonymous$$atrix4x4.identity;