This should be an easy one, but i can’t figure out whats going on. I have a plane that gets created in front of my camera. I use look at in the direction of the camera, but the surface faces up instead of at my camera.
var plane:GameObject=new GameObject.CreatePrimitive(PrimitiveType.Plane);
var fwd=viewingCamera.transform.position+viewingCamera.transform.forward*(viewingCamera.farClipPlane-10);
plane.transform.position=fwd;
plane.transform.LookAt(viewingCamera.transform);
The only thing i can think of is that the edge of the plane is facing the camera, not sure why this would be the case.
Thanks in advance!