PDA

View Full Version : Expression loop


DrWeeny
01-26-2011, 08: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 ?

Thanks

haggi
01-26-2011, 10: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))

DrWeeny
01-26-2011, 11:07 AM
Thanks a lot, it works !
And thanks to answer fast :)

CGTalk Moderation
01-26-2011, 11:07 AM
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.