This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
targetPos = thisComp.layer("target").toComp([0,0]); // Compensating for the missing "targetPos" variable | |
box = thisComp.layer("box"); | |
boxTopLeft = box.toComp([0,0]); | |
boxBottomRight = box.toComp([box.width,box.height]); | |
// this is erroneous on their part. "deltaX" and "xDistanceToEdge" does not exist yet, commented out. | |
boxAnchor = box.toComp(box.anchorPoint);// xRatio = deltaX/xDistanceToEdge; | |
deltaVec = sub(targetPos, boxAnchor) | |
deltaX = deltaVec[0]; |