A simpler way to do this is to use the 'Fresnel' shader node and plug it into the opacity input of the shader. If you set the 'exponent' value of the fresnel node to something close to 1 it'll be pretty tight around the view of the player. Mathematically it's pretty much the same as Jordans suggestion but just a bit…
A fresnel node uses a dot product of the camera vector and the normal vector. So it would move around as the angle and position of the camera moves in relation the surface the material is on. It's typically used on a water surface to make the water more opaque the further away from the camera it is.