- Home /
Rotate Texture2D around its center
Hi
I have to rotate a Texture2D around its center, depending of my angle... But the real problem is that i don't know which command would i use.
HOw can i rotate a specific TEXTURE2D Object???
Thanks! :D
Answer by DaveA · Aug 26, 2010 at 08:04 PM
If you mean a texture in the 3D scene, I had this same need (rotating particle's textures actually). I found this helpful:
http://unity3d.com/support/documentation/ScriptReference/Material.SetMatrix.html
BUT this is using a materia to the texture...i have only the texture, i mean I cannot access by code the material of my texture cause it doesn't exist, i draw the texture on the screen...I don't know to use RotateAroundPivot() :P
Answer by Jean-Fabre · Jan 26, 2011 at 05:00 AM
Hi,
There is a working example of RotateAroundPivot() here:
http://answers.unity3d.com/questions/3561/how-to-rotate-gui-textures
Bye,
Jean
Your answer
Follow this Question
Related Questions
Select part of the texture in GUI.DrawTexture 2 Answers
GUI Rotation 1 Answer
Update Texture type to GUI during runtime 0 Answers
Same BackGroung For All Screen Resolution 1 Answer
Why is texture blurred in one GuiStyle and not in another? 1 Answer