After Effects lights can be moved around in 3D space but a lens flare effect can only move in 2D space on the X and Y axis. So how can you add a 2d lens flare to a 3D moving light?
The secret is using a simple expression on the “Flare Center” of the lens effect.
1. Alt Click on Flare Center stop watch to add expression
2. Type this in the expression box:
NOTE: Just change “Light 1” to the name of your light.
This tip can be found in the bump map tutorial around 6:15 for those who would like to see it in action. View Tutorial
Dan Ebberts has an ever useful “3D Lens Flare” case study on his website that includes distance falloff. Check that out.
Here is an anamorphic lens flare project too.