- April 12, 2021 at 10:13 am
Hi all. Can anyone help me with this one?
Imagine a comp with two circles.
Circle A is moving around randomly.
Circle B is static.
When circle A moves near to circle B (lets say within 200 pixels), I would like circle B to move away in the opposite direction, then return to its start position when circle A is over 200 pixels away.
I’ve found several scripts, but they always seem move the circle in a specific X/Y direction rather than away from the other object.
Does something like this exist?
- April 12, 2021 at 10:20 am
The Newton 2D physics engine for AE might be worth looking at… https://www.motionboutique.com/newton-physics-simulator-engine-after-effects/
- April 12, 2021 at 10:28 am
Thanks Ben. I’ve not heard of this plugin before. I’ll take a look.
I am wondering if there is a way of doing this without plugins.
- April 12, 2021 at 11:58 am
You can set an expression so square B always faces square A, then modify its anchor point, which will push it away in the opposite direction.
- April 13, 2021 at 5:48 am
Wow, very elegant indeed! Thanks Daniel!
Log in to reply.