I'm just wondering why this works:
thisComp.layer("m").position.valueAtTime(time - .1)
but this doesn't:
[position[0], thisComp.layer("m").position[1].valueAtTime (time - 0.1)]
TIA!
Robby
using valueAtTime() on individual channels
-
- Posts: 114
- Joined: March 10th, 2005, 5:50 am
- Location: London, UK
- Contact:
Hi Robby,
The problem arises because you are calling the valueAtTime method on a Number (position[1]), not a position Value (position):
You may find it easier to understand things in future if you break your code up onto separate lines:
Cheers,
Dave
The problem arises because you are calling the valueAtTime method on a Number (position[1]), not a position Value (position):
Code: Select all
//bad
position[1].valueAtTime(time - 0.1)
//good
position.valueAtTime(time - 0.1)[1]
Code: Select all
x = position[0];
y = thisComp.layer("m").position.valueAtTime(time-0.1)[1];
[x,y]
Dave
-
- Posts: 114
- Joined: March 10th, 2005, 5:50 am
- Location: London, UK
- Contact:
Hilarious. You make it sound like herpes or something!