Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Rotation (Y rotation)

New Here ,
Jun 26, 2021 Jun 26, 2021

Copy link to clipboard

Copied

Hi everyone,

I'm doing a projet that I'd like to rotate (Y rotation) towards the left (speed 20) for 2.1 seconds then I'd like it to go back to initial position and create a loop.  For now I have added time*20 to the "Y rotation" module what expression should I use to create the desired loop?

Thank you very much for your input!

VB

TOPICS
Expressions

Views

140

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Jun 26, 2021 Jun 26, 2021
Probably like this:t = time%2.1; t*20or like this if you need it to ping pong:dur = 2.1; t = time%dur; n = Math.floor(time/dur); (n%2 ? dur-t : t)*20

Likes

Translate

Translate
Adobe Community Professional ,
Jun 26, 2021 Jun 26, 2021

Copy link to clipboard

Copied

Nothing to add because this is not how these expressions work and to be honest your workflow is just terrible. Instead create two linear keyframes with the respective values, one at zero and one at 1 second and apply a loopOut(cycle) expression.

 

Mylenium

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 26, 2021 Jun 26, 2021

Copy link to clipboard

Copied

Probably like this:

t = time%2.1;
t*20

or like this if you need it to ping pong:

dur = 2.1;
t = time%dur;
n = Math.floor(time/dur);
(n%2 ?  dur-t : t)*20

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 26, 2021 Jun 26, 2021

Copy link to clipboard

Copied

LATEST

Wow awesome thanks!!! It works!!

However, my main composition no longer takes the timing of another composition into consideration.

 

Let me explain: Lights on the UFO should start 3 seconds (screenshot "2") ...

 

2.jpg

... however they are visible on the main composition from 00:00 (screenshot "1").

 

1.jpg

Do we know why? It never happened to me before.

Thank you again for your help! That's awesome to get input from this community!

VB

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines