2d text focuses on camera but get rotate 180 when camera rotates around the object

105 Views Asked by At

I have created multiple gameobjects in the scene with parent child relationship. When I move the camera with a joystick it moves around the node in an orbit. but when the camera moves vertically the 2D text on Node gameobject which focuses the camera by LookAround(), it rotates 180 degrees. Which is in the opposite direction.

1

There are 1 best solutions below

1
66Gramms On

Use Transform.LookAt. Get a reference to the camera's transform, for example with Transform mainCam = Camera.main.transform then in the update function of your 2D text or any object you want to look at the camera use transform.LookAt(mainCam);