- Home /
Tilt an image by the X axis?
Hello,
I want to tilt an image by the X axis. So it looks kind of 3D?
It doesn't look like I can use Vector3 in GUIUtility.RotateAroundPivot
Right now the image shows up as shown below.
I want to have it tilted like this:
public bool showing = false;
public Texture2D image = null;
private void OnGUI()
{
GUIStyle guiStyle = new GUIStyle("button");
guiStyle.fontSize = 20;
guiStyle.normal.textColor = Color.white;
if (GUI.Button(new Rect(75, 400, 400, 100), "Find available conference rooms near by.", guiStyle))
{
Debug.Log("Button pressed!");
showing = true;
}
if(showing)
{
GUI.DrawTexture(new Rect(30, 30, 500, 500), image);
}
}
Comment
Your answer
Follow this Question
Related Questions
Texture2D rotate & translate 0 Answers
Detect WWW Image bitmap dimensions? 2 Answers
Unity 5.0 Trying to Change the Image - Source Image via Script 3 Answers