- Home /
The question is answered, right answer was accepted
Rotation text
Hi. I want to rotated my text. When my object Rotated to 90 to 270 text will be show reverse(180 rotation).
Update () { Vector3 Rot= transform.eulerAngles; float overRotation = Rot.z % 180; int baseRotation = (int)(Rot.z / 180f)*180; if(overRotation==90) { transform.eulerAngles = new Vector3(baseRotation +180,0, 0); } else { transform.eulerAngles = new Vector3( baseRotation,0,0); }
In this code Rotation is working but when my object X value is -1 to -180. I want when object reache 90 to 270 text will rotated to 180.
Follow this Question
Related Questions
cannot drag script to player.Guitext error,cannot drag player script to the player in hierarchy 2 Answers
simple 360 degree Cube-rotation around y axis 2 Answers
Drawing UI text on GUI.DrawTexture , How to do it ? 1 Answer
Can someone help me with GUI script what I have? 1 Answer
Fix Blurry UI text? 10 Answers