Expressions. Finding an error
Hi all.
Link to project file
https://drive.google.com/file/d/1FEXf970NN_MgKxgOmItByiXgOWM85kzk/view?usp=sharing
Changing the Scale property, depending on the position of the camera.
When the camera approaches the composition being filmed,
the scale of the composition should change downwards.
And ultimately in the "Camera 1" window, the view should remain unchanged.
Property -- comp("Test").layer("CompA").transform.scale.expression =
--------------------------------------------------------------------
CSP = [0,0,-2000]; //camera start position
CP = thisComp.layer("CamControl").transform.position; //camera position
Zero = [0,0,0];
iniLenth = length(sub(CSP , Zero));
carentLenth = length(sub(Zero, CP));
carentScale = (carentLenth/iniLenth)*100;
[carentScale, carentScale, carentScale];
---------------------------------------------------------------------
In my opinion, the expression is written correctly, but
When the camera approaches the composition being filmed,
its scale changes, and the initial value of the SCALE property is 104.1 ????
