Constraint orient animation in the expression editor


#1

Hi!
I have three objects: the first rotate on X axis every frame and this is the expression that drive it:

first_object.rotateX = time * 4

The second has to rotate only when the third object is in a certain position, so I write this expression:

if (third_object.translateX == 0.85) {
second_object_orientConstraint1.first_objectW0 = 1;
}
else {
second_object_orientConstraint1.first_objectW0 = 0;
}

But I need the second object to rotate progressivly not on the exact rotation of the first object. For example if the translate X of the first object become 0.85 at frame 15, the second object has to start rotate like the first object but from 0, not from the current rotation of the first object. Checking or unchecking the “maintain offset” option doesn’t change the result.
How can I do it?

Thanks.