.toWorld function with a 2D Point control
Let's say I have 2 layers in a composition. A layer "A" with its position animated. And a layer "B" with its position linked with expression to Layer "A" 's position. Therefore, when A moves, B moves accordingly.
I wanted to make "B" overshoot its trajectory, for this, I used a fairly complicated expression. So far, so good, it works.
BUT, I'd like to change the source of the position animation. It won't be the position of layer "A" anymore, but a 2D Point control called "Point A" applied on layer "B". This "Point A" is linked with expression to Layer "A" 's position.
So I replaced the .position property by .effect("Point A")("Point") but it doesn't work. There is no bug in the Expression panel but the overshoot trajectory is gone...
I'm wondering if I'm not missing something here?
Can you first get this to work without the overshoot element of the script? I'm not sure what was added before and after the overshooting script, as that is (likely) the problem.
I only use this expression with copy/paste, not using a script and it works fine (without me trying to modify it for 2D Point problem). But you're right, it comes from an old version of the script Duik.
So you think that this expression uses function only described in the script file or something like that?
I didn't think of this because the expression as itself is working without the use of the script.
No what I'm suggesting is that the expression is dependent on some properties that aren't passing through a toWorld function, so that it's not registering correctly.
Can you highlight the changes you made before and after the toWorld was added? You may need to parse some of the data back through a fromWorld or something similar.
The original expression already has the toWorld function, here is the expression :
And here is the same expression with my changes in bold :