LookAt(Camera) misshaping sprite

I am having a problem, where a Billboard script is misshaping the sprite which it is attached to. The camera in this example behaves as a typical RTS camera, and as the camera moves around, the sprite expands and contracts in size.

First image shows the predetermined size of sprite, with the script turned off

Second image shows how the sprite expands when looking towards the camera

Is there a function which can replace LookAt(), which does a similar job, or is there some other way of restraining the shape of the sprite?

My current LookAt script is

    void Update()
    {
        transform.LookAt(Camera.main.transform.position, Vector3.up);
    }

Thanks in advance.

Still having this problem. Any help would be appriciated.

It sounds like the billboard script is maybe making the sprite look at the wrong camera (the main camera instead of the canvas camera the sprite is rendered on)? If you upload a cut down project with just a sprite and camera I can have a look.

1 Like