• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

336

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

Community Expert , Jun 26, 2021 Jun 26, 2021

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

 

Votes

Translate

Translate
LEGEND ,
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

Votes

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
Community Expert ,
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

 

Votes

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

Votes

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