Hi Ian,
The recipe that would work best is to have the moving around layers in 3d,
but the lines (beam-filter) that connect them need to be applied to a 2D layer that is as big as the comp and is drawn on top of the 3d-layers.
The expression trick is that the 2d-layer needs to know what the equivalent position of the 3d-positions is in 2D.
(this is what’s called: a layer space transformation.)
Dan Ebberts has the theory all explained on his wonderful site ‘motionscript.com’:
https://www.motionscript.com/mastering-expressions/lst-lens-flare.html
basically where in 2D you normally would wind up with an expression like this:
thisComp.layer(“object 1”).position
you now need something like this:
thisComp.layer(“object 1”).toComp(thisComp.layer(“object 1”).anchorPoint);
Check out Dan’s Site
He can explain it best 😎