-
Keep Mask in Place when Layer Move/Scales?
I’m currently creating a preset that requires a mask that stays connected to the bottom of the screen. If have managed to make the following expression that manages to keep the mask in place when the layer is moved, but it still moves when scaled. Does anyone have any ideas on how I could fix this issue?
var compWide = thisComp.width;
var compHigh = thisComp.height;
var halfComp = [compWide/2,compHigh/2];
var floorHigh = effect("Controls")("Floor Height")/100;var worldPos = thisLayer.toWorld(transform.position);
var worldPosOffset = (worldPos - halfComp);var bl = [0, compHigh ] - worldPosOffset;
var br = [compWide, compHigh] - worldPosOffset;var tl = [0 , compHigh - (floorHigh * compHigh)] - worldPosOffset;
var tr = [compWide, compHigh - (floorHigh * compHigh)] - worldPosOffset;createPath(points = [tl ,tr ,br ,bl ], inTangents = [], outTangents = [], is_closed = true)