|
| Shawn |
| If i want to script pSphere1 so it at frame 21 has the translation values of pCube1 at frame 2... how could that look? i want to automate the animation of several objects and all should be timeshifted from the first one and with the offset as a variable so i have to point at translation values at a certain frame |
| Ted Town |
| pseudocode: pSphere1.translation = pCube1.starttranslation*(thisframe-2)/19 + pSphere1.starttranslation*(21-thisframe)/19 just a basic tweening equation between two values, shifting the weighting factor over tie time* |
| Shawn |
| oh so "thisframe" is acctually a "variable" that wrks? hmm must test |
| Ted Town |
| of course not, its pseudocode |
| Shawn |
| pseudocode =) heheh didn't read it all |
| Ted Town |
| I suppose you could use a dummy object with a custom attribute to store an animation curve go get better control over how it moves between them over time aswell go=to* |
| Shawn |
| there is acctually a timeFunction node in maya that trax uses maybe something that one can use |
| Ted Town |
| Im sure there has to be a global variable like "frame" or something but the code wont work if you plan to animate the objects manually as well. Then you'd have to query the position of the objects at every frame or make some other expression that will update the variables automatically when the position change there's TONS of cool stuff you could do with this, hehe procedural animation is awsome |