- Home /
Why my instantiated 3d text is flipped?
I have a 3d text which always look at the camera using the SmoothLookAt script. I copy exactly the same quaternion information (x,y,z,w) of the text to instantiate 3dtexts on run time exactly at the same rotation position of that first reference 3d text but what i get is a flipped text. What is going wrong?
happy halloween:)
Answer by Gorov · Dec 15, 2011 at 09:24 PM
It's very simple, just change the X scale of your 3DText to -1.
Hi, your answer works like charm, but I'm curious if you know why this issue exists? Is this a unity bug?
Answer by e-bonneville · Oct 31, 2010 at 12:02 PM
I think it's because the LookAt function doesn't work quite like you'd expect; sure, it makes the object look at you, but it's making the Z axis point at you. That isn't necessarily the front.
Try taking the LookAt function off of the text and rotating your camera manually. You could also try making a new GameObject, putting the text in the GameObject and setting all its rotations to zero, and then putting LookAt function on the GameObject. If that doesn't do it, someone else cleverer than I will have to answer. Good luck.
~ Elliot Bonneville
Answer by Loius · Oct 31, 2010 at 03:51 PM
Try LookAt-ing the opposite direction (instead of player.position - me.position, LookAt me.position - player.position)
Answer by GeorgeRigato · Aug 22, 2012 at 07:02 PM
Changing the X scale to -1 worked!
Sure its annoying simple, but I never would come up with this solution by myself.
Answer by Blenderik · Jul 20, 2020 at 05:26 PM
I really dislike neg. scale. This seems so profoundly stupid to me. Just make transform.forward the actual forward, Unity! I now rotate it 180° in local space y. You could also use a parent object, however: IT SHOULD NOT BE LIKE THIS!