Hyren123
Hyren123

Reputation: 59

Unity World Space Canvas Not Maintaining Size as Camera Rotates

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

Upvotes: 1

Views: 1695

Answers (1)

Hyren123
Hyren123

Reputation: 59

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.

Upvotes: 1

Related Questions