Why does LookAt look away?

Hey folks,

I’m trying to make a billboard that always faces the camera, so I made a Quad primitive and attached the following script:

function FixedUpdate() {

For some reason, this makes the quad point away from the camera, rather than towards it.

This is something I can easily fix by flipping the quad around its local Y axis afterwards, but it seems like such a brain fart on the part of Unity that I’m wondering if I missed something. If there’s a “definitive” way to make a camera-facing billboard in Unity, what does it look like?

Note that I already saw this and this and a bunch of similar stuff, but nothing that relies on Transform.LookAt seems to work by itself. What’s going on here?

Start with a new scene and create a Quad at the origin. If you think about it, you are looking at the back side of the Quad. The forward side is facing away from the camera. When you do a LookAt() you are pointing the forward (i.e. the backside of the plane) at the position indicated. Try this instead:

transform.rotation = Quaternion.LookRotation(transform.position - Camera.main.transform.position);

You can also do the same thing by: transform.LookAt(transform.position * 2 - Camera.main.transform.position);