2
$\begingroup$

I know it's possible and have been trying to figure it out with animation nodes, but does anyone know how to take multiple objects at a starting point and have them translate away (rotate/location) from an effector object, such as an empty, as its passing through them. After the empty has passed through the group of objects I want there to be a falloff making the objects return back to its original position.

For example I am trying to take a group of objects close together and pass an empty through them. At the same time displacing each objects location and rotation away from the empty and as the empty gets farther away from each object they move back to their original form.

any help with this is greatly appreciated! And cheers in advance! enter image description here

$\endgroup$

1 Answer 1

3
$\begingroup$

enter image description here

Welcome to StackExchange. This is very easy to do :)

Step-1: Put all the objects into a separate collection. Then, select all the objects and open the N-panel, click the option From Current Transforms under AN-tab. It will store the initial transforms of all the objects, enter image description here

Step-2: Add the Collection Info node and select the collection in which you stored the objects (in Step-1). Then connect objects to the Object ID Key node and in the search option select the Initial Transforms option, enter image description here

Step-3: Then add an empty (I have renamed it as Effector). To move objects away from the Effector, we have to calculate the directions which are pointing toward the Effector (empty) from the objects' location. We can do that by subtracting the Effector's location from the locations of the objects. For further control, I have added another Vertex Math node (with Multiply mode) to restrict the motion of the objects in XY-plane by making Z = 0, enter image description here

Step-4: Next, add the Offset Matrix node to offset the initial locations of the objects along the directions which we have calculated in Step-3, and also you can offset the rotations as you like, enter image description here

Step-5: Final step is, add the Object Controller Falloff node to control falloff of Offset Matrix node, adjust of falloff node as you like, enter image description here By the way you can also combine the different falloffs.

Blend File:

$\endgroup$
2
  • 1
    $\begingroup$ This is exactly what I was looking for! Thank you for the help. Cheers mate! $\endgroup$
    – A_Weber
    Commented Nov 16, 2019 at 21:07
  • 1
    $\begingroup$ Wow what an interesting question/answer. Thanks ! $\endgroup$
    – user83425
    Commented Nov 16, 2019 at 22:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .