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
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.
Copy link to clipboard
Copied
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 🙂
Copy link to clipboard
Copied
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.