ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Starting and stopping rotation value with checkbox....and ease

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
rob aitken
Starting and stopping rotation value with checkbox....and ease
on Dec 8, 2016 at 6:47:46 pm

Hey everyone


So here's my problem for today.

Basically, I'm trying to use "time*60" for a rotation value, but I want to able to start and stop the rotation, preferably with an ease in and out (however the last step I can work around if its impossible).


I tried using the Motion2 script for spin

d = effect("Z Rotation - Spin Direction")("ADBE Checkbox Control-0001");
calibrate = effect("Z Rotation - Spin Calibrate")("ADBE Slider Control-0001");
on_off = effect("Z Rotation - Spin On/Off")("ADBE Checkbox Control-0001");

if (on_off == 1) {
veloc = effect("Z Rotation - Spins /sec")("ADBE Angle Control-0001");
if (d == 1) {
r = (rotation + (time - inPoint) * veloc) + calibrate;
} else {
r = ((rotation + (time - inPoint) * veloc) + calibrate) * -1;
}
}



But the problem is when I keyframe the on/off checkbox, the rotation snaps back to zero, whereas I need it to stay at its current rotation.


Return to posts index

Dan Ebberts
Re: Starting and stopping rotation value with checkbox....and ease
on Dec 8, 2016 at 8:11:00 pm

This thread should be helpful:

https://forums.creativecow.net/thread/227/34463


Dan



Return to posts index

rob aitken
Re: Starting and stopping rotation value with checkbox....and ease
on Dec 8, 2016 at 8:49:24 pm

THANK YOU!

This works fantastic, although it would be super awesome to be able to ease in and out when the checkbox is ticked, do you know if this is possible?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]