I am currently trying to display a rotating needle gauge to the player, and have the gauge show how far left or right of center the user is. I can mathematically find the needed angle the needle needs to be at, but as I am trying to display this through GUI I don’t know how to rotate a texture/image in GUI.
How do I rotate a texture drawn to the GUI?
You cannot rotate a GUITexture. You can rotate a texture drawn with GUI.DrawTexture(). See the answer by @duck here for an example:
If you Google “RotateAroundPivot Unity3d,” you will find a number of other questions dealing with rotating a GUI drawn texture.
You can’t rotate a GUITexture, but in the GUI system it’s possible to modify the matrix so that GUI stuff is rendered at a given rotation, scale or offset. The easiest way to rotate a texture is by using GUIUtility.RotateAroundPivot - take a look at this question for more details.