-
Checkbox + Interpolation Problem
Hey all,
I am struggling getting the following to work
Aim:
- Have 2 null objects which the camera can potentially autofocus on,
- Use a checkbox to switch between the 2 values,
- Have a 5 second transition between the 2 values.
Problem:
- The interpolation starts from ‘frame 0’ instead of from where the checkbox keyframe is.
Code:
target1 = thisComp.layer(“Focus”);
v1 = target1.toWorld(target1.anchorPoint) – toWorld([0,0,0]);
v2 = toWorldVec([0,0,1]);
v3 = dot(v1,v2);target2 = thisComp.layer(“ForceFocus”);
b1 = target2.toWorld(target2.anchorPoint) – toWorld([0,0,0]);
b2 = toWorldVec([0,0,1]);
b3 = dot(b1,b2);if (thisComp.layer(“Focus”).effect(“FocusNull”)(“Checkbox”)==true) {
ease(time, 0, 5, b3, v3);
} else {
ease(time, 0, 5, v3, b3);
}If anyone can help out with this it wold be much appreciated.
I am on a fairly tight timeline with this one and could really benefit from somebody’s knowledge.Kinds regards
Nathan