- Home /
Question by
bstout · Dec 03, 2016 at 07:41 AM ·
textcanvasinstantiate prefabaim
aim instantiated GUI text at camera
I am instantiating a canvas with a text child. I want the text to aim at the camera. The code I am trying is:
Instantiate(canvas, pos, canvas.transform.rotation );
GameObject cam = GameObject.FindWithTag("MainCamera");
target = cam.transform;
canvas.transform.LookAt(target);
the canvas/text appears in the right place, but the text does not aim at the target. any help is greatly appreciated.
Comment