-
Value in relation to keyframes
so im not sure how to describe what i want to be able to do here, but ill take a shot.
i have a particle system being controlled by 2 nulls. 1 null is parented to another object, gets path info etc, and it gives the particle system the xy position. then i parented a seperate null to the 1st, just do deal with z position. so the emitter gets its z position from that 2nd null.
this is more an issue of me being lazy i guess, but isnt that what expressions are for? if i make time adjustments to the keys that control the xy position, if i dont make sure i also adjust the keys on the z position null, the motion of the path gets messed up. im wondering if there is an expression that will say something like…
‘if you are at a keyframe, be 0, if you are not, be 100 (or whatever value), and anywhere in between a key be at the correct percentage of 100 corresponding to how far between keys you are’.
does that make sense? so if i have a key at frame 1, and a key at frame 10, and i set the CTI to frame 5, the z would calculate a value of 50 because its in the middle. if i set the CTI to frame 3 or 7 it would be 30%, etc… the xy values dont matter, just where their keyframes are.
basically im trying to make a line that hops around a map, representing a flight, hence why i need z now, as the travelling line is no longer constrained to just driving around ON the map. so this would make the line automatically arc into the air between keys, as the keys usualy mark destinations where the path turns.
my problem with this is telling it how to figure out where a keyframe is and where it is in relation to other keys. im sure its probably pretty easy.
looking forward to more expression magic! thanks!