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.

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

tbaypaul

06 June 2009, 04:00 PM

when you parent the locator to the wheel it's transform space is constant even though it is moving along with the wheel (the wheel does the work, the locator is just along for the ride)....point constrain another locator to that first locator and then use the constrained locator's y value in the expression.

tdHendrix

06 June 2009, 06:07 PM

Since the locator is parented under the gear its values will be the local values of the locator relative to its parent rather than the world space values. So when you rotate the gear I guess you could say that the locator isn't really moving and it's just coming along for the ride since it's parented to the gear. To fix it you will need to parent constrain (Constrain->Parent) the locator to the gear instead. That way its translation values will be the world values and it will still come along for the ride when the gear rotates.

CGTalk Moderation

06 June 2009, 06:07 PM

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.

Follow Us On:

The CGSociety

The CGSociety is the most respected and accessible global organization for creative digital artists. The CGS supports artists at every level by offering a range of services to connect, inform, educate and promote digital artists worldwide. More about us on TheArtSociety.com