Snuurtje
06-10-2009, 02:49 PM
Hi, i got a scene that includes a gear thats rotating, next to it is a spring witch i want the Yscale to increase and decrease as the wheel turns. I thought i could achieve this by parenting a locator to my gear, witch rotates along, and then track the Yposition of that locator, and trough an expression let that set the scale of my spring.
Here is the expression code i got so far:
$scale = biggear1|biggearlocator1.translateY;
spring2.scaleY = $scale;
My idea was that the translation of the locator in the Y axis would go from say 0 to 10 and back to 0. But theres noowhere an attribute that tracks this.
Can anyone help me with this?
Got a screenshot for a bit of clarification maybe: http://snuur.nl/files/springgear.jpg
greetings
Here is the expression code i got so far:
$scale = biggear1|biggearlocator1.translateY;
spring2.scaleY = $scale;
My idea was that the translation of the locator in the Y axis would go from say 0 to 10 and back to 0. But theres noowhere an attribute that tracks this.
Can anyone help me with this?
Got a screenshot for a bit of clarification maybe: http://snuur.nl/files/springgear.jpg
greetings
