my goal is to recreate autorotate evaluation in bifrost like i made it with expressions.
expression example:
given:
locator1 - driver
locator2 - driven
locator1 has custom created double3 attribute that stores position
// get previous position
vector $a = <<
locator1.lastPosX,
locator1.lastPosY,
locator1.lastPosZ
>>;
// get cur position
vector $b = <<
locator1.translateX,
locator1.translateY,
locator1.translateZ
>>;
// delta (direction)
vector $dir = $b - $a;
// apply new position
locator2.translateX = $dir.x;
locator2.translateY = $dir.y;
locator2.translateZ = $dir.z;
// store new position
locator1.lastPosX = $cur_pos.x;
locator1.lastPosY = $cur_pos.y;
locator1.lastPosZ = $cur_pos.z;
what it does - its updating driven object while you drag driver
how to recreate this in bifrist graph editor?
I believe what you're trying to do is this:
Use "port feedback" to store the last position for the next iteration.
If you RMB on a port of the output you can choose a "port feedback" on the input to connect it to.
In this example (inside a simple compound) "position" goes into "last_position1".
In the next iteration this "last_position1" will show up on the input "last_position" and you can use it e.g. in the subtraction.