0
$\begingroup$

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

$\endgroup$
2
  • $\begingroup$ Isn't that, that it is necessary to hold shift, while drawing, to have this "magnetic effect"? $\endgroup$ – MaxBlender Dec 12 '20 at 11:32
  • $\begingroup$ 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. $\endgroup$ – Juan Manuel Lynch Dec 12 '20 at 11:42
2
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.