- Home /
3D Text to follow FPS
I added some 3D text over an object. I want the text to follow the FPS. I added the following to the 3D Text:
var target : Transform;
function Update () { if (target) { transform.LookAt(target); } }
And on the target var I added the FPS.
The 3D text follows the FPS Ok, but the text is 180 degrees out. How do I get the 3D Text to flip 180 degrees so that it faces the FPS?
thnx
Answer by Mike 3 · Aug 06, 2010 at 08:21 PM
Try this:
if (target)
{
transform.rotation = target.rotation;
}
Instead of looking at the fps object, it'll look in the same directionas it, so should always look right from the camera
That works like a champ. Sorry, newbie... $$anonymous$$akes sense! Thanks!
You're welcome, though please mark the answer as solved so it doesn't pop up on the front page once a week :D
Your answer
![](https://koobas.hobune.stream/wayback/20220613070629im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Is it possible to script a 3D Text? 1 Answer
IF in a GUI 2 Answers
How to clone on collision 0 Answers
Replace Text with coresponding 3D Models 1 Answer
How do I make sliding last for a definite number of time 1 Answer