View Full Version : Expression loop

01 January 2011, 09:25 AM
Hi evreybody,
I'm new to Maya expression and I have to rig a airport board (departure/arrival as the old one with all the little plane rotating)
I make an attribute for the rotation of the plane which go to 0 and 1 and then put this expression to a controller :

Colonne_01|Lamelle_01|Lamelle1.turn = abs(sin(ControlShape.translateX))

The problem is that the animation go well from 0 to 1 but then, the animation reverse from 1 to 0.
Are they an expression which can make a loop from 0 to 1 ?


01 January 2011, 11:08 AM
A modulo could work. This way you will get values from 0-1 only.

Colonne_01|Lamelle_01|Lamelle1.turn = abs(sin(ControlShape.translateX % 1))

01 January 2011, 12:07 PM
Thanks a lot, it works !
And thanks to answer fast :)

CGTalk Moderation
01 January 2011, 12: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.