Angle between plane and camera

I am trying to get the angle between a mesh (plane) and the main camera, because I need to fade out the plane when the camera sees it from a certain angle.

What would be the easiest way to get the angle between the mesh and camera? Thanks for this one, cause my math sucks. :sweat_smile:

just learned this one myself: Vector3.AngleBetween

hereโ€™s the variable from my script:

var fov = Vector3.AngleBetween (transform.TransformDirection (Vector3.forward), playerDir) * Mathf.Rad2Deg;

you have to include that last bit (multiply by Mathf.Rad2Deg) to use degrees.

the full script is in this post:

http://forum.otee.dk/viewtopic.php?t=1862

and the reference for it in the doc (bottom of page):

Thanks a lot drJones!