Programmatically Control The Rotation of a Cube
I thought I would post a few little quartz composer bits here that may be of help to others. This one is designed to rotate a cube (for instance) by a pre-set angle, in a pre-set amount of time upon a signal (eg a key press). It's not pretty and could probably be simplified, but it does work.
Duration :
how long to move an increment
increase / decrease:
positive or negative increment signal (NB: you have to increase before it can decrease!)
increment:
how much to increment by (by the time it has finished)
Max:
when to roll over
reset:
signal to return to 0
Take your rotation off the rolled-over value.