0

Using animation nodes how can I make an object keep following and other object with some delay, a behavior very similar to the one you can see in most paint tools for stabilizing strokes, here is an example: https://www.youtube.com/watch?v=ah13EISw7nc

The only difference is that at the end of the transform both objects should have same location.

EDIT

here a perfect example of what I'm trying to reproduce, but without "actions" enter link description here

  • Isn't that, that it is necessary to hold shift, while drawing, to have this "magnetic effect"? – MaxBlender Dec 12 '20 at 11:32
  • For the example provided could be, but I am not trying to reproduce de stabilizer function, I shared the link in order to show how objects should behave. The idea is to move an object and this other object should follow the first one with a delay. – Juan Manuel Lynch Dec 12 '20 at 11:42

1 Answers1

2

Method 1 (Recommended)

You can evaluate Fcurves to get trailing or attractive effect. You need a source object with location keyframes. Then follow node tree given below. enter image description here

enter image description here

Method 2

We can also do this without keyframed source object by storing positions of object. enter image description here For storing object transformation as Matrixlist:

setattr(AN, "store", Matrix4x4List()) if frame == 1 else AN.store.append(x)

Get stored Matrixlist:

AN.store[-amount:]

enter image description here

Harisreedhar
  • 3,054
  • 7
  • 11