How does Damper know what to animate to when Cyclic is turned on? When LFO changes its output from 0.99 to 0.1, what does Damper computes so that its result into 0.99 to 1.1?
Thanks for putting in the screenshots, I didn’t search that deep!
The first screenshot you provided has GetCyclicValue which looks remarkably similar to the code here. I’m wondering why they have the same logic at two different places.
I don’t think the cyclic logic is complicated, it just happened to be quote involved for Damper.
My use case is that I want to create custom animation nodes as the inbuilt ones aren’t enough for me (for eg. I want to port this lib). The porting part is comparatively simpler than understanding how to make the Cyclic option work in it.
Update: What I think I’m doing wrong here is that HandleCyclic should take a difference between Goto Position and Damper’s current value, and not between Goto Position and previous frame’s Goto Position.
I wrote those animation nodes so that they as well can drive to the target with as few energy and sudden changes as possible. However, you could also have different motivations in mind. It’s your animation node.
So, if your animation currently has a high speed, you could do some more cycles or favor the shortest distance to the goal. It’s up to you.
from the lab back then:
here you can see how the starting velocity is the driving factor in which cyclic target point to select.