PDF (adobe.com)

Example: Make a 3D layer invisible if facing away from camera

 Apply the following expression to the Opacity property of a 3D layer:
  if (toCompVec([0, 0, 1])[2] > 0 ) value else 0

Dan Ebberts explains this expression on his website: www.adobe.com/go/learn_ae_motionscriptinvisiblelayer.