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

Apply Drift Over time to multiple objects with random directions for each

New Here ,
Apr 13, 2020 Apr 13, 2020

Copy link to clipboard

Copied

Hi all! Very new to AE and would appreciate any help I can get. 

 

I'm trying to get 8 different objects to move, each in different random directions, within the bounds of my frame (1920x1080) for 5 seconds. 

 

Right now I'm attempting this with the the DriftOverTime expression. How would I get each object to move in different random directions and also stay within the frame??

 

I'm essentially trying to rcreate the "DVD" screensaver but with 8 objects 

TOPICS
Expressions

Views

1.2K

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 ,
Apr 13, 2020 Apr 13, 2020

Copy link to clipboard

Copied

What "Drift Over Time" expression? If it is the included animation preset you can easily change the angle by adjusting the direction of each layer. To adjust the other parameters you'll have to modify each expression. 

 

It would really help us help you if we saw a screenshot and had a good description of exactly how you wanted the layers to move. It might be easier to just add a wiggle expression like this to position. Each layer would have a different random seed so the movement would be different for each layer.

 

wiggle(.25, 800)

That would randomly move a layer up to 800 pixels over 4 seconds and create some nice curved motion paths.

 

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 ,
Apr 13, 2020 Apr 13, 2020

Copy link to clipboard

Copied

Screen Shot 2020-04-13 at 8.17.45 PM.png

Thank you Rick - here is a screenshot. I trying to get each object to start in a random position and then move in random, linear motion paths while staying within the bounds of the frame the whole time. 

 

I hope this is more helpful 🙂

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 ,
Apr 13, 2020 Apr 13, 2020

Copy link to clipboard

Copied

LATEST

You can get the different angles by adjusting the angle in the preset, but the get the edge detection you are going to either going to add some keyframes manually or add about 20 lines of code to the expression that detects the size of the layer including any scale factor, the size of the frame, and calculates a reflection angle for the collision. I've been doing this for a very long time and I would guess that it would take me 3 or 4 hours to come up with an expression or 3 or 4 minutes to keyframe the animation preset. Your choice.

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