Angle Control

Moderators: Disciple, zlovatt

Post Reply
blindchild
Posts: 14
Joined: February 8th, 2009, 2:19 pm

November 17th, 2011, 6:07 am

Hi,

My college math is failing me.

I would like to convert the angle control value so that:
0°-90° = 0-100
90°-180° = 100-0
180°-270° = 0-100
270°-360° = 100-0
360°-450° = 0-100.....
...and so on. I would like the angle controller to be able to beyond 1 rotation, ie. 2x+120° and beyond.

I remember vaguely there being cos and sin and tan involved. But I cannot at all remember how to work it out.

Can someone please school me?

Thank you.

Ross
Dan Ebberts
Posts: 319
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

November 17th, 2011, 9:32 am

Something like this should work:

a = effect("Angle Control")("Angle")%180;
a < 90 ? linear(a,0,90,0,100) : linear(a,90,180,100,0)


Dan
blindchild
Posts: 14
Joined: February 8th, 2009, 2:19 pm

November 22nd, 2011, 1:29 pm

Thanks Dan, that worked perfectly! :-)
Post Reply