-
Time Remap Loop using an Expression Control
I am trying to set up a puppet for a character with a pseudo-3D effect. I have 8 images of the character at different angles, which, when viewed in sequence, form a 360 degree rotation around the character.
I set up the 8 images in sequence in a pre-comp, and now I am trying to create a controller for the rotation using Time Remapping.
How can I code an expression for Time Remapping to have it continue looping as the controller’s value goes up?
Here’s what I have right now:
This code is mostly non-functional. The top line makes it so that 1.00 on the slider = 1st frame of the pre-comp, and that’s about it. I don’t know how to make the If statement recursive so that it’s constantly checking to see if offset is less than 8 (right now it only loops once and then continues growing), and going less than 0 on the Slider does not rotate backwards, I’m guessing because you can’t have a negative Time Remapping.
Does anyone have any tips that might point me in the right direction?
offset = thisComp.layer("LI_rotation").effect("Torso Rotation")("Slider")/24;
if (offset > 8){
offset - 8
}
else if (-8 <= offset <= 8 ) {
offset
}
else if (offset < -8) {
offset + 8
}