I added a random plane into the scene and attached the following line of code to make it billboard or sprite behavior:
function Update()
{
transform.rotation = Quaternion.LookRotation(Camera.main.transform.up,Vector3.up);
}
The only problem I got now is, that the billboard is always visible. See picture below: The billboard is actually attached to a cube which is behind the yellow wall. However I don’t want it to be visible by the camera in that case. How can I change that?
