- Home /
Why isn't the text centered in my game screen?
Hi everyone,
I put some text in my scene for a main menu. When i go to the game screen, the text isnt centered but is on the right... How do i fix this?:
Answer by BobbleHead · May 25, 2013 at 08:53 PM
Could this be to do with you camera position in scene?
Yes i had to put the x, and z axis to 0... i thought :p
Answer by SnailMail152 · May 25, 2013 at 08:57 PM
Because it looks like in the inspector the position is not 0,0,0? I think -1 through 1 are the coordinates for text
Answer by Owen-Reynolds · May 25, 2013 at 09:25 PM
You're using 3DText objects (that's what the TextMesh component is.) Those are placed in the game world, as if they really were giant signs. Nothing wrong with that, but the camera has to be aimed at them, be wide enough, they have to be angled to face it... .
For example, you can "walk around" them in scene view. They are good if you want to make something appear to have a real label stuck onto it.
Many people instead use GUIText's for GUI-like text. Those are pasted directly onto the screen (always using 0-1 coords) and don't care where the camera is aimed.
Your answer
Follow this Question
Related Questions
Implementing Game Center 2 Answers
C# Physics.SphereCast Center of Screen 2 Answers
How Do I Center A GUI Label? 5 Answers
A node in a childnode? 1 Answer
I can't go back to the start up screen after hitting not now 0 Answers