- Home /
Question by
reguig-abdo · May 20, 2017 at 08:48 AM ·
uilookatui image
UI rotation problem
Hi I have this code to make the button always facing the camera. But I get this weird stretching, and when I use the script on the canvas it does nothing
Vector3 v = myCamera.transform.position - transform.position;
v.x = v.z = 0.0f;
transform.LookAt(myCamera.transform.position - v);
transform.Rotate(0, 180, 0);
capture.jpg
(217.1 kB)
Comment
Your answer
Follow this Question
Related Questions
Poke hole in UI Image? 1 Answer
Rotating and scaling UI image messes up anchors? 0 Answers
UI object move? 2 Answers
Instantiating Image makes whole Canvas disappear in Playmode 1 Answer
UI image with button component not tracking mouse correctly 1 Answer