Let’s say you’ve tracked an object in a scene and would like to apply a Video Copilot’s Optical Flares to the general location. By quick whipping the flare position to the tracked NULL’s position you wont be able to offset the location of the flare. With this little snippet you’ll be able to by adjusting the anchor point of the NULL.
posX = thisComp.layer("flare tracker").transform.position posY = thisComp.layer("flare tracker").transform.position diffX=thisComp.layer("flare tracker").transform.anchorPoint diffY=thisComp.layer("flare tracker").transform.anchorPoint X=posX-diffX;
Here is what’s happening: We are subtracting the original position of the tracker with the anchor point and reapplying the value to X/Y. It’s quite simple. Add this to your snippet library and you’re off and running!