How do you make a plane/billboard look at the camera? (solved)

SOLVED - just use a quad instead of a plane (quad is a gameobject like plane)

I have a plane with a texture on it. I want the plane to always face the camera. So If I look up and see the plane, the plane is showing me whatever texture it has on it no matter what my camera’s transform. When I rotate the camera I don’t want the billboard to do anything expect just face me so I can see the texture on it’s plane.

//make the plane look at the camera with the plane's vector3 forward pointing at camera
transform.LookAt(lookAtThis.transform.position, Vector3.up);

Just a little tip: it looks like you’ve declared lookAtThis as a GameObject (or maybe a Camera?). Since you’re only using the transform, you might instead declare it as Transform. This will let you drag anything with a Transform into that slot in the inspector, and reduce your code a little (you’ll no longer need to call .transform on it). It also makes your intentions a bit more clear, which is always a good thing.

1 Like

Done, I made that adjustment. From now on I’ll make the declares more specific :slight_smile:

Are you good at rotating things by any chance? http://forum.unity3d.com/threads/how-do-you-rotate-the-camera-down-to-45-degrees-no-matter-what-direction-youre-facing.364279/

I’m trying to rotate the camera down by 45 degrees when the user hits C, the problem is the rotation always faces one direction.

I understand how to work with transform.positions, but transform.rotation still has me stumped. I don’t know how to remember a rotation, perform the rotate down by 45 degree calculation, then apply it to the transform.