1
votes

I have created a prefab that has a Canvas on it. I load this prefab into the game by a few button presses. In the script attached to the prefab it has a counter it starts, and prints it to the Text element on the Prefab. I have used the Billboard script from Unity Wiki to keep the canvas facing the camera, which it does do correctly. The problem is as the camera rotates about the Canvas, the Canvas shrinks and the characters become illegible.

I can provide images of this.

The prefab is a wall, the canvas is just over it. The Canvas is set to World Space, no Event Camera, Default Sorting Layer. It also has Canvas Scaler on it, and a Graphic Raycaster.

I used the exact same setup and Scripts on an Enemy object, that is a a Capsule instead of a box. Is that what I am fighting?

I do not understand this issue, and have not been able to find anything on line as of yet to get an answer.

Normal Appearance

When Facing from Not a Long Edge

1
It'd probably help if you included the script in your question, since that is almost definitely the bit causing the problem. - Everless Drop 41
wiki.unity3d.com/index.php?title=CameraFacingBillboard It's the first code snip at the top. This code works perfectly on an enemy model i have that is a cylinder. I just thought about the fact that it could be the Scaling on the main object. Does scaling effect child objects? - Hyren123
yes it does affect child objects - MX D
Yeah I tested that earlier today. That is exactly what I am fighting. I feel dumb for not thinking about that sooner. - Hyren123

1 Answers

1
votes

Canvas objects that are Children, are affected by scale of the parent. This makes sense, but is frustrating in this instance. Knowing that I can restructure my scene and fix these problems. Thanks for the help.