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

Need help with randomizing rotation for multiple objects

Explorer ,
Oct 16, 2018 Oct 16, 2018

Copy link to clipboard

Copied

I am trying to have two logos rotate randomly independent of each other but they follow the exact same motions.  IE I want one logo to spin its own way while the other spins its own way.  Right now they do the exact same thing.  Here is a picture if it helps.  Screenshot (2).png

Views

3.6K

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 , Oct 16, 2018 Oct 16, 2018

Play around with this:

seedRandom(index,true);

time*random(360)

Dan

Votes

Translate

Translate
Community Expert ,
Oct 16, 2018 Oct 16, 2018

Copy link to clipboard

Copied

You need to add a different random seed for each random number generator. You can easily figure out how to do that if you spend five minutes in the expression language guide you will find by typing “random expression” in the search help field at the top right corner of AE.

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
Explorer ,
Oct 16, 2018 Oct 16, 2018

Copy link to clipboard

Copied

I tried seedRandom but it didn't make any difference.  Screenshot (3).png

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 ,
Oct 16, 2018 Oct 16, 2018

Copy link to clipboard

Copied

Play around with this:

seedRandom(index,true);

time*random(360)

Dan

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
Explorer ,
Oct 16, 2018 Oct 16, 2018

Copy link to clipboard

Copied

Yes that worked!  Thank you both.  Could one of you possibly explain exactly what is going on in that script?  I'm not very good at scripting or programming.

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 ,
Oct 16, 2018 Oct 16, 2018

Copy link to clipboard

Copied

seedRandom(index,true) sets a unique random seed for each layer. random(360) generates a random number between 0 and 360, which, when multiplied by time will give you a rotation of that many degrees per second.

Dan

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 ,
Mar 23, 2023 Mar 23, 2023

Copy link to clipboard

Copied

LATEST

Hi, thanks for the explanation. Can you help me with randomly rotating a layer by 90 degrees each time?

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