ObeidaZakzak
Hello,
Using the Solver SOP is of course the way to do what you are looking for, but the Attribute Wrangle inside is missing something to make it work as intended.
If you want to keep the previously written value, then you have to store it in a variable and return it when the "if" statement condition is not satisfied.// get current pos attrib value float pos = detail(0, "pos"); // initialize offset value to add to pos attrib // when "if" statement is not satisfied then offset is 0 and will not affect pos attrib value float offset = 0; // sin function values are always between -1 and 1 // enter "if" statement only when sin value is between 0 and 1 float signal = sin(@Time * chf('speed')); if (signal >= 0) { offset = chf('units') * signal; } setdetailattrib(0, "pos", pos + offset, "set");
Not sure why you need velocity from another geometry, you can find an example with velocity as well in the hip file.
This is exactly what I needed to understand Houdini's logic regarding the memory of variables!
Believe it or not, this opens up a world of possibilities for implementing ideas.
I believe you are a social benefactor operating within the jurisdiction of the galaxy.
Thank you very much for your help Obeida.
