-
Can’t get xRotation value of another layer in After Effects
I have two layers – a leader and a follower.
I’m successfully able to make the follower follow the leader with this expression in the follower’s Position property:
src=thisComp.layer("Leader"); delay = thisComp.layer("Leader").effect("Delay")("Slider"); d = delay*thisComp.frameDuration*(index - 1); src.position.valueAtTime(time - d);I can also make it follow the leader’s orientation with this expression in the follower’s Orientation property:
src=thisComp.layer("Leader"); delay = thisComp.layer("Leader").effect("Delay")("Slider"); d = delay*thisComp.frameDuration*(index - 1); src.orientation.valueAtTime(time - d);However, when I try to make the follower follow the leader’s xRotation with the following in the follower’s xRotation property, I get an error:
src=thisComp.layer("Leader"); delay = thisComp.layer("Leader").effect("Delay")("Slider"); d = delay*thisComp.frameDuration*(index - 1); src.xRotation.valueAtTime(time - d);The error:
Cannot read read property 'valueAtTime' of undefinedThe code works fine for the other properties – why not the xRotation?
The leader definitely has xRotation keyframes in it.
Thank you